Set workspace name correctly
This commit is contained in:
@@ -149,6 +149,9 @@ export class FileTreeComponent implements OnInit, OnDestroy {
|
|||||||
const file = files[i];
|
const file = files[i];
|
||||||
if (file.webkitRelativePath?.includes('/')) {
|
if (file.webkitRelativePath?.includes('/')) {
|
||||||
// Got a file in a folder, so put it into the appropriate folder in the tree
|
// 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);
|
const splitFilePath = file.webkitRelativePath.split('/').slice(1);
|
||||||
let currentChildren: FileOrFolder[] | undefined = mappedFiles;
|
let currentChildren: FileOrFolder[] | undefined = mappedFiles;
|
||||||
for (let j = 0; j < splitFilePath.length - 1; j++) {
|
for (let j = 0; j < splitFilePath.length - 1; j++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user