Skip to content

Commit d0e541f

Browse files
committed
use dunce to avoid UNC paths on windows
1 parent 7c3339a commit d0e541f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

plugins/python3/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ serde = "1"
1313
serde_json = "1"
1414
thiserror = "1"
1515
walkdir = "2"
16+
dunce = "1"
1617

1718
[dev-dependencies]
1819
env_logger = "0.8"

plugins/python3/src/plugin.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,8 @@ fn run_tmc_command(
221221
});
222222
}
223223

224-
let path = path
225-
.canonicalize()
226-
.map_err(|e| PythonError::Canonicalize(path.to_path_buf(), e))?;
224+
let path =
225+
dunce::canonicalize(path).map_err(|e| PythonError::Canonicalize(path.to_path_buf(), e))?;
227226
log::debug!("running tmc command at {}", path.display());
228227
let common_args = ["-m", "tmc"];
229228

0 commit comments

Comments
 (0)