diff options
author | Ryan Clements <ryanclementshax@gmail.com> | 2023-06-16 06:43:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-16 19:43:59 +0900 |
commit | d32287d2111ec7b845e09c7cfe6a5d779c5f3bd1 (patch) | |
tree | 20341750a687b05458a5cae8a634fb3ac79888f9 /ext/node/polyfills/_fs/_fs_link.ts | |
parent | 239dc5e681ad61fb77ed7e0791a8512d6842040b (diff) |
fix(ext/node): remove fromFileUrl from "node:path" (#19504)
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_link.ts')
-rw-r--r-- | ext/node/polyfills/_fs/_fs_link.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/node/polyfills/_fs/_fs_link.ts b/ext/node/polyfills/_fs/_fs_link.ts index 3039ade09..affa42852 100644 --- a/ext/node/polyfills/_fs/_fs_link.ts +++ b/ext/node/polyfills/_fs/_fs_link.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. import type { CallbackWithError } from "ext:deno_node/_fs/_fs_common.ts"; -import { fromFileUrl } from "ext:deno_node/path.ts"; +import { pathFromURL } from "ext:deno_web/00_infra.js"; import { promisify } from "ext:deno_node/internal/util.mjs"; /** @@ -13,9 +13,9 @@ export function link( callback: CallbackWithError, ) { existingPath = existingPath instanceof URL - ? fromFileUrl(existingPath) + ? pathFromURL(existingPath) : existingPath; - newPath = newPath instanceof URL ? fromFileUrl(newPath) : newPath; + newPath = newPath instanceof URL ? pathFromURL(newPath) : newPath; Deno.link(existingPath, newPath).then(() => callback(null), callback); } @@ -38,9 +38,9 @@ export function linkSync( newPath: string | URL, ) { existingPath = existingPath instanceof URL - ? fromFileUrl(existingPath) + ? pathFromURL(existingPath) : existingPath; - newPath = newPath instanceof URL ? fromFileUrl(newPath) : newPath; + newPath = newPath instanceof URL ? pathFromURL(newPath) : newPath; Deno.linkSync(existingPath, newPath); } |