From 1e18b9e768779aee905c671e06f4a3368aeb88a5 Mon Sep 17 00:00:00 2001 From: vato007 Date: Sun, 18 May 2025 10:43:08 +0930 Subject: [PATCH] Set workspace name correctly --- src/app/file-tree/file-tree.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/file-tree/file-tree.component.ts b/src/app/file-tree/file-tree.component.ts index 167b489..0ba3f99 100644 --- a/src/app/file-tree/file-tree.component.ts +++ b/src/app/file-tree/file-tree.component.ts @@ -149,6 +149,9 @@ export class FileTreeComponent implements OnInit, OnDestroy { const file = files[i]; if (file.webkitRelativePath?.includes('/')) { // Got a file in a folder, so put it into the appropriate folder in the tree + if (i === 0) { + this.selectedDirectory.set(file.webkitRelativePath.split('/')[0]); + } const splitFilePath = file.webkitRelativePath.split('/').slice(1); let currentChildren: FileOrFolder[] | undefined = mappedFiles; for (let j = 0; j < splitFilePath.length - 1; j++) {