diff options
| author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-10-30 02:19:03 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-30 03:19:03 +0100 |
| commit | 6be6c517d0691bf1d14eef67668e575c84cdfdf4 (patch) | |
| tree | fd6b37f2807f78325a08fff5e34166d6eec84ca7 /cli/fmt.rs | |
| parent | 1854c6f73be9d4439807911ce9cba1125af93dd4 (diff) | |
fix(cli/fmt): Strip "\\?\" prefix when displaying Windows paths (#8135)
Diffstat (limited to 'cli/fmt.rs')
| -rw-r--r-- | cli/fmt.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cli/fmt.rs b/cli/fmt.rs index 3f97282eb..a932fbc95 100644 --- a/cli/fmt.rs +++ b/cli/fmt.rs @@ -9,6 +9,7 @@ use crate::colors; use crate::diff::diff; +use crate::fs::canonicalize_path; use crate::fs::files_in_subtree; use crate::text_encoding; use deno_core::error::generic_error; @@ -238,16 +239,16 @@ pub fn collect_files( if files.is_empty() { target_files.extend(files_in_subtree( - std::env::current_dir()?.canonicalize()?, + canonicalize_path(&std::env::current_dir()?)?, is_supported, )); } else { for file in files { if file.is_dir() { target_files - .extend(files_in_subtree(file.canonicalize()?, is_supported)); + .extend(files_in_subtree(canonicalize_path(&file)?, is_supported)); } else { - target_files.push(file.canonicalize()?); + target_files.push(canonicalize_path(&file)?); }; } } |
