summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/_fs/_fs_open.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_open.ts')
-rw-r--r--ext/node/polyfills/_fs/_fs_open.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/node/polyfills/_fs/_fs_open.ts b/ext/node/polyfills/_fs/_fs_open.ts
index a2b2917e6..9b4de4ce4 100644
--- a/ext/node/polyfills/_fs/_fs_open.ts
+++ b/ext/node/polyfills/_fs/_fs_open.ts
@@ -137,7 +137,7 @@ export function open(
path as string,
convertFlagAndModeToOptions(flags as openFlags, mode),
).then(
- (file) => callback!(null, file.rid),
+ (file) => callback!(null, file[Symbol.for("Deno.internal.rid")]),
(err) => (callback as (err: Error) => void)(err),
);
}
@@ -186,8 +186,10 @@ export function openSync(
throw new Error(`EEXIST: file already exists, open '${path}'`);
}
- return Deno.openSync(path as string, convertFlagAndModeToOptions(flags, mode))
- .rid;
+ return Deno.openSync(
+ path as string,
+ convertFlagAndModeToOptions(flags, mode),
+ )[Symbol.for("Deno.internal.rid")];
}
function existenceCheckRequired(flags: openFlags | number) {