summaryrefslogtreecommitdiff
path: root/cli/file_watcher.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2021-11-01 16:22:08 -0400
committerGitHub <noreply@github.com>2021-11-01 16:22:08 -0400
commit2794d0b7a29dc2c84438f5004dd35d00d6d29007 (patch)
tree966bcc5a6163014868443f028c1397082635cd50 /cli/file_watcher.rs
parentb92019a8475a16213028ab73b15be5a3f7c56e0a (diff)
fix(fmt/lint): strip unc paths on Windows when displaying file paths in lint and fmt (#12606)
Diffstat (limited to 'cli/file_watcher.rs')
-rw-r--r--cli/file_watcher.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/file_watcher.rs b/cli/file_watcher.rs
index 4a3471f22..c7fff4632 100644
--- a/cli/file_watcher.rs
+++ b/cli/file_watcher.rs
@@ -1,6 +1,8 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
use crate::colors;
+use crate::fs_util::canonicalize_path;
+
use deno_core::error::AnyError;
use deno_core::futures::stream::{Stream, StreamExt};
use deno_core::futures::Future;
@@ -231,7 +233,7 @@ fn new_watcher(
let paths = event
.paths
.iter()
- .filter_map(|path| path.canonicalize().ok());
+ .filter_map(|path| canonicalize_path(path).ok());
let mut changed_paths = changed_paths.lock();
changed_paths.extend(paths);
}