Skip to content

Commit

Permalink
Fixed FileIndexFS.fileForFileInode
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Mar 16, 2024
1 parent 0094f98 commit 6b6afb4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/FileIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ export abstract class FileIndexFS<TIndex> extends Readonly(FileSystem) {
return new NoSyncFile(this, path, flag, stats, stats.fileData);
}

return this.fileForFileInode(inode);
return this.fileForFileInode(inode, path, flag);
}

public openFileSync(path: string, flag: FileFlag, cred: Cred): NoSyncFile<this> {
Expand All @@ -439,7 +439,7 @@ export abstract class FileIndexFS<TIndex> extends Readonly(FileSystem) {
return new NoSyncFile(this, path, flag, stats, stats.fileData);
}

return this.fileForFileInodeSync(inode);
return this.fileForFileInodeSync(inode, path, flag);
}

public async readdir(path: string): Promise<string[]> {
Expand Down Expand Up @@ -472,20 +472,20 @@ export abstract class FileIndexFS<TIndex> extends Readonly(FileSystem) {

protected abstract statFileInode(inode: IndexFileInode<TIndex>): Promise<Stats>;

protected abstract fileForFileInode(inode: IndexFileInode<TIndex>): Promise<NoSyncFile<this>>;

protected abstract statFileInodeSync(inode: IndexFileInode<TIndex>): Stats;

protected abstract fileForFileInodeSync(inode: IndexFileInode<TIndex>): NoSyncFile<this>;
protected abstract fileForFileInode(inode: IndexFileInode<TIndex>, path: string, flag: FileFlag): Promise<NoSyncFile<this>>;

protected abstract fileForFileInodeSync(inode: IndexFileInode<TIndex>, path: string, flag: FileFlag): NoSyncFile<this>;
}

export abstract class SyncFileIndexFS<TIndex> extends Sync(FileIndexFS<unknown>) {
protected async statFileInode(inode: IndexFileInode<TIndex>): Promise<Stats> {
return this.statFileInodeSync(inode);
}

protected async fileForFileInode(inode: IndexFileInode<TIndex>): Promise<NoSyncFile<this>> {
return this.fileForFileInodeSync(inode);
protected async fileForFileInode(inode: IndexFileInode<TIndex>, path: string, flag: FileFlag): Promise<NoSyncFile<this>> {
return this.fileForFileInodeSync(inode, path, flag);
}
}

Expand Down

0 comments on commit 6b6afb4

Please sign in to comment.