diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-09-28 07:55:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-28 07:55:01 -0400 |
commit | fc739dc5eb2769e4608ccf08d23ca8ff0fcc19c5 (patch) | |
tree | 9c5bca411f4b9a6aea5a190d88217f4925563ad3 /cli/file_fetcher.rs | |
parent | b694efb3849c4737e8ad617a9a48d5488e21d5da (diff) |
refactor: use deno_path_util (#25918)
Diffstat (limited to 'cli/file_fetcher.rs')
-rw-r--r-- | cli/file_fetcher.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<File, AnyError> { - 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 |