-
Notifications
You must be signed in to change notification settings - Fork 722
Open
Description
Line 383 in d5b2ec9
| async createFileStructure(uri, pathString, isFile = true) { |
Problem:
helpers.createFileStructure() passes isFile only at the top-level call. Inside its loop, it calls:
if (!(await fsOperation(newPath).exists())) { ... }exists()is called onnewPathcreateFile()/createDirectory()is called on the parent path (currentUri)stat()insidefsOperation.extend()cannot know whether the path is intended to be a file or folder.
Impact:
- Files inside folders are treated as directories.
- Creating folders in the root may fail.
- Virtual paths cannot be correctly typed (
isFile/isDirectory) before creation.
Root cause:
isFile is never passed to fsOperation(newPath).exists() or stat().
Proposed solution:
- Expose the
isFileintent tofsOperation.extend()/stat()calls inside the loop. - Or provide a context/hook so FS extensions can detect the user’s intent.
Notes:
- Affects virtual file systems (paths not tied to a real filesystem).
- Current workarounds require storing
isFileexternally, which is complex.
Metadata
Metadata
Assignees
Labels
No labels