Skip to content

Commit

Permalink
Fixed #4
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed May 22, 2024
1 parent 61acbb6 commit b2af58f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ZipFS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { type Backend } from '@zenfs/core/backends/backend.js';
import { basename, dirname } from '@zenfs/core/emulation/path.js';
import { Errno, ErrnoError } from '@zenfs/core/error.js';
import { FileSystem, Readonly, Sync, type FileSystemMetadata } from '@zenfs/core/filesystem.js';
import { FileEntry, Header, sizeof_FileEntry } from './zip.js';
import { FileEntry, Header } from './zip.js';

/**
* Configuration options for a ZipFS file system.
Expand Down Expand Up @@ -110,7 +110,7 @@ export class ZipFS extends Readonly(Sync(FileSystem)) {
const cdEnd = ptr + this.eocd.size;

while (ptr < cdEnd) {
const cd = new FileEntry(this.data, this.data.slice(ptr, sizeof_FileEntry));
const cd = new FileEntry(this.data, this.data.slice(ptr));
/* Paths must be absolute,
yet zip file paths are always relative to the zip root.
So we prepend '/' and call it a day. */
Expand Down

0 comments on commit b2af58f

Please sign in to comment.