From 6b6afb4ea0df5f2134a28c85ebf989682b5ff10d Mon Sep 17 00:00:00 2001 From: Vortex Date: Fri, 15 Mar 2024 20:29:24 -0500 Subject: [PATCH] Fixed FileIndexFS.fileForFileInode --- src/FileIndex.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/FileIndex.ts b/src/FileIndex.ts index 0fa12ef32..02b9c6e40 100644 --- a/src/FileIndex.ts +++ b/src/FileIndex.ts @@ -414,7 +414,7 @@ export abstract class FileIndexFS 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 { @@ -439,7 +439,7 @@ export abstract class FileIndexFS 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 { @@ -472,11 +472,11 @@ export abstract class FileIndexFS extends Readonly(FileSystem) { protected abstract statFileInode(inode: IndexFileInode): Promise; - protected abstract fileForFileInode(inode: IndexFileInode): Promise>; - protected abstract statFileInodeSync(inode: IndexFileInode): Stats; - protected abstract fileForFileInodeSync(inode: IndexFileInode): NoSyncFile; + protected abstract fileForFileInode(inode: IndexFileInode, path: string, flag: FileFlag): Promise>; + + protected abstract fileForFileInodeSync(inode: IndexFileInode, path: string, flag: FileFlag): NoSyncFile; } export abstract class SyncFileIndexFS extends Sync(FileIndexFS) { @@ -484,8 +484,8 @@ export abstract class SyncFileIndexFS extends Sync(FileIndexFS) return this.statFileInodeSync(inode); } - protected async fileForFileInode(inode: IndexFileInode): Promise> { - return this.fileForFileInodeSync(inode); + protected async fileForFileInode(inode: IndexFileInode, path: string, flag: FileFlag): Promise> { + return this.fileForFileInodeSync(inode, path, flag); } }