diff --git a/src/api/LocalFS.ts b/src/api/LocalFS.ts index 3e1a9a17..f417a886 100644 --- a/src/api/LocalFS.ts +++ b/src/api/LocalFS.ts @@ -128,10 +128,20 @@ class LocalFS extends AFSProvider { } const parentFolder = path.slice(0, path.lastIndexOf("/")); - const [parentHandle, realPath] = + // eslint-disable-next-line prefer-const + let [parentHandle, realPath] = await this.getChildDirHandle(parentFolder); const fileName = path.slice(path.lastIndexOf("/") + 1); + if (realPath[0] === "/") { + realPath = realPath.slice(1); + } + console.log( + "filename: ", + fileName, + "\nrealPath: ", + realPath + "/" + fileName, + ); if ( this.stats.has(realPath + "/" + fileName) && (this.stats.get(realPath + "/" + fileName).mode & 0o170000) ===