diff options
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_utimes.ts')
-rw-r--r-- | ext/node/polyfills/_fs/_fs_utimes.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/node/polyfills/_fs/_fs_utimes.ts b/ext/node/polyfills/_fs/_fs_utimes.ts index 93b108f00..0fef8fd05 100644 --- a/ext/node/polyfills/_fs/_fs_utimes.ts +++ b/ext/node/polyfills/_fs/_fs_utimes.ts @@ -1,7 +1,7 @@ // 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"; function getValidTime( @@ -30,7 +30,7 @@ export function utimes( mtime: number | string | Date, callback: CallbackWithError, ) { - path = path instanceof URL ? fromFileUrl(path) : path; + path = path instanceof URL ? pathFromURL(path) : path; if (!callback) { throw new Deno.errors.InvalidData("No callback function supplied"); @@ -53,7 +53,7 @@ export function utimesSync( atime: number | string | Date, mtime: number | string | Date, ) { - path = path instanceof URL ? fromFileUrl(path) : path; + path = path instanceof URL ? pathFromURL(path) : path; atime = getValidTime(atime, "atime"); mtime = getValidTime(mtime, "mtime"); |