Skip to content

Commit b97bc57

Browse files
committed
Convert to unix separators on Windows
1 parent 8a05f47 commit b97bc57

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

asyncgit/src/sync/blame.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ pub fn blame_file(
4242
) -> Result<FileBlame> {
4343
scope_time!("blame_file");
4444

45+
let file_path: &gix::bstr::BStr = file_path.into();
46+
let file_path =
47+
gix::path::to_unix_separators_on_windows(file_path);
48+
4549
let repo: gix::Repository =
4650
gix::ThreadSafeRepository::discover_with_environment_overrides(repo_path.gitpath())
4751
.map(Into::into)?;
@@ -64,7 +68,7 @@ pub fn blame_file(
6468
tip,
6569
cache,
6670
&mut resource_cache,
67-
file_path.into(),
71+
&file_path,
6872
options,
6973
)?;
7074

@@ -132,7 +136,7 @@ pub fn blame_file(
132136

133137
let file_blame = FileBlame {
134138
commit_id,
135-
path: file_path.into(),
139+
path: file_path.to_string(),
136140
lines,
137141
};
138142

0 commit comments

Comments
 (0)