zen-fs / zip

ZenFS Backend for zip files
https://zenfs.dev/zip/
MIT License
5 stars 3 forks source link

Reading file cause ENOENT error #6

Closed atty303 closed 5 months ago

atty303 commented 5 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")); // --> true
    console.log(await zenfs.promises.readFile("/root/.image.tsv"));

This lead to error.

Error: No such file or directory
    at _ErrnoError.With (chunk-VATA5WVB.js?v=693bd934:8481:12)
    at _open (chunk-VATA5WVB.js?v=693bd934:13219:24)
    at async open (chunk-VATA5WVB.js?v=693bd934:13239:10)
    at async Object.readFile (chunk-VATA5WVB.js?v=693bd934:13243:67)
    at async DriverWorker.start (worker.ts?worker_file&type=module:95:21)
james-pre commented 5 months ago

I reproduced it locally and found an issue with core.

james-pre commented 5 months ago

@atty303 core v0.12.4 fixes the issue.

atty303 commented 5 months ago

Thanks, I was able to confirm the fix for this Issue.