Do not list root as a child of root in ReadDir

This commit is contained in:
Abhishek Shroff
2024-08-06 10:15:27 +05:30
parent fe0ac5cfdd
commit ff905ed429
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -52,6 +52,7 @@ WITH RECURSIVE nodes(id, parent, name, dir, created, modified, size, etag, depth
ON r.id = p.resource_id
AND p.user_id = @user_id::int
WHERE deleted IS NULL
AND r.id != @id
AND CASE WHEN @recursive::boolean THEN true ELSE depth < 1 END
)
SELECT * from nodes