diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-01-25 23:51:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-25 23:51:29 +0100 |
commit | 0b0fb94ce2489da642cffd82e0498446d4a1fe1f (patch) | |
tree | af3fd4fd60e0e9fdf5301ac2881b8e5c43f25cbb /ext/node/polyfills/_fs/_fs_fsync.ts | |
parent | 7038074c8583465872b16083f54f2211312f0943 (diff) |
fix(fs): instanceof check for Deno.FsFile (#22121)
Regression caused by https://github.com/denoland/deno/pull/22072.
I added a relevant test so we don't regress again.
Fixes https://github.com/denoland/deno/issues/22115
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_fsync.ts')
-rw-r--r-- | ext/node/polyfills/_fs/_fs_fsync.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/node/polyfills/_fs/_fs_fsync.ts b/ext/node/polyfills/_fs/_fs_fsync.ts index 942aecf6a..75d4b3756 100644 --- a/ext/node/polyfills/_fs/_fs_fsync.ts +++ b/ext/node/polyfills/_fs/_fs_fsync.ts @@ -10,9 +10,12 @@ export function fsync( fd: number, callback: CallbackWithError, ) { - new FsFile(fd).sync().then(() => callback(null), callback); + new FsFile(fd, Symbol.for("Deno.internal.FsFile")).sync().then( + () => callback(null), + callback, + ); } export function fsyncSync(fd: number) { - new FsFile(fd).syncSync(); + new FsFile(fd, Symbol.for("Deno.internal.FsFile")).syncSync(); } |