From fc739dc5eb2769e4608ccf08d23ca8ff0fcc19c5 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sat, 28 Sep 2024 07:55:01 -0400 Subject: refactor: use deno_path_util (#25918) --- cli/file_fetcher.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/file_fetcher.rs') diff --git a/cli/file_fetcher.rs b/cli/file_fetcher.rs index ca1144939..1bf763594 100644 --- a/cli/file_fetcher.rs +++ b/cli/file_fetcher.rs @@ -21,9 +21,9 @@ use deno_core::url::Url; use deno_core::ModuleSpecifier; use deno_graph::source::LoaderChecksum; +use deno_path_util::url_to_file_path; use deno_runtime::deno_permissions::PermissionsContainer; use deno_runtime::deno_web::BlobStore; -use deno_runtime::fs_util::specifier_to_file_path; use log::debug; use std::borrow::Cow; use std::collections::HashMap; @@ -136,7 +136,7 @@ impl MemoryFiles { /// Fetch a source file from the local file system. fn fetch_local(specifier: &ModuleSpecifier) -> Result { - let local = specifier_to_file_path(specifier).map_err(|_| { + let local = url_to_file_path(specifier).map_err(|_| { uri_error(format!("Invalid file path.\n Specifier: {specifier}")) })?; // If it doesnt have a extension, we want to treat it as typescript by default -- cgit v1.2.3