summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/_fs/_fs_ftruncate.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_ftruncate.ts')
-rw-r--r--ext/node/polyfills/_fs/_fs_ftruncate.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/node/polyfills/_fs/_fs_ftruncate.ts b/ext/node/polyfills/_fs/_fs_ftruncate.ts
index 71186e868..92af46f52 100644
--- a/ext/node/polyfills/_fs/_fs_ftruncate.ts
+++ b/ext/node/polyfills/_fs/_fs_ftruncate.ts
@@ -20,9 +20,12 @@ export function ftruncate(
if (!callback) throw new Error("No callback function supplied");
- new FsFile(fd).truncate(len).then(() => callback(null), callback);
+ new FsFile(fd, Symbol.for("Deno.internal.FsFile")).truncate(len).then(
+ () => callback(null),
+ callback,
+ );
}
export function ftruncateSync(fd: number, len?: number) {
- new FsFile(fd).truncateSync(len);
+ new FsFile(fd, Symbol.for("Deno.internal.FsFile")).truncateSync(len);
}