From 2794d0b7a29dc2c84438f5004dd35d00d6d29007 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 1 Nov 2021 16:22:08 -0400 Subject: fix(fmt/lint): strip unc paths on Windows when displaying file paths in lint and fmt (#12606) --- cli/file_watcher.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cli/file_watcher.rs') 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); } -- cgit v1.2.3