Skip to content

Commit f0af959

Browse files
authored
Merge pull request #69 from epage/dunce
fix(win): Strip of UNC path pefix
2 parents 68e3e98 + 07dac1e commit f0af959

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ serde = { version = "1.0.152", features = ["derive"] }
5555
flate2 = "1.0.25"
5656
once_cell = "1.17.0"
5757
bugreport = "0.5.0"
58+
dunce = "1.0.3"
5859

5960
[dev-dependencies]
6061
snapbox = { version = "0.4.10", features = ["path"] }

src/blame.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,7 @@ fn to_repo_relative(
171171
let workdir = repo.workdir().ok_or_else(|| {
172172
anyhow::format_err!("No workdir found; Bare repositories are not supported")
173173
})?;
174-
let abs_path = path
175-
.canonicalize()
174+
let abs_path = dunce::canonicalize(path)
176175
.with_context(|| anyhow::format_err!("Could not read {}", path.display()))?;
177176
let rel_path = abs_path.strip_prefix(workdir).map_err(|_| {
178177
anyhow::format_err!(

0 commit comments

Comments
 (0)