Skip to content

Commit

Permalink
fix symlinks in OPFS
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgrammerIn-wonderland committed Nov 7, 2024
1 parent 2ff2b0f commit 19a8bd1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/api/LocalFS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,20 @@ class LocalFS extends AFSProvider<LocalFSStats> {
}

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) ===
Expand Down

0 comments on commit 19a8bd1

Please sign in to comment.