zen-fs / zip

ZenFS Backend for zip files
https://zen-fs.github.io/zip/
MIT License
5 stars 1 forks source link

Missing `/` entry #5

Closed atty303 closed 3 months ago

atty303 commented 3 months ago
    const rootZip = await fetch(`https://pob-web-asset.atty303.ninja/versions/v2.42.0/root.zip`);
    await zenfs.configure({
      mounts: {
        "/root": {
          backend: Zip,
          data: await rootZip.arrayBuffer(),
          name: "root.zip",
        },
      },
    });

    console.log(await zenfs.promises.exists("/root/.image.tsv")); // --> false
    console.log(await zenfs.promises.exists("/root")); // --> false
    console.log(await zenfs.promises.exists("/")); // --> true

Such a simple file existence check will also fail. After a bit of chasing, it appears that it is trying to statSync an entry for "/" and it is not in the ZipFS entry list. It is likely that the difference is that we stopped using IndexFS.

james-pre commented 3 months ago

I'm sorry, I cleary broke some things during the overhaul. v0.4.3 fixes this.

james-pre commented 3 months ago

@atty303 Does this fix all of the issues?

Again, I apologize for all of the bugs.