diff options
-rw-r--r-- | apps/files/src/store/paths.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/files/src/store/paths.ts b/apps/files/src/store/paths.ts index 4a83cb51c83..54d937cce6b 100644 --- a/apps/files/src/store/paths.ts +++ b/apps/files/src/store/paths.ts @@ -67,6 +67,15 @@ export const usePathsStore = function(...args) { }) } + if (node.type === FileType.Folder && node.path === '/') { + const root = files.getRoot(service) + if (root === undefined) { + Vue.set(node, '_children', files.getNodesByPath(service, '/')) + files.setRoot({ service, root: node as Folder }) + } + return + } + // Update parent folder children if exists // If the folder is the root, get it and update it this.addNodeToParentChildren(node) |