Skip to content

Commit 4006939

Browse files
committed
Convert to unix separators on Windows
1 parent 48f0a89 commit 4006939

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
@@ -51,6 +51,10 @@ pub fn blame_file(
5151
) -> Result<FileBlame> {
5252
scope_time!("blame_file");
5353

54+
let file_path: &gix::bstr::BStr = file_path.into();
55+
let file_path =
56+
gix::path::to_unix_separators_on_windows(file_path);
57+
5458
let repo: gix::Repository =
5559
gix::ThreadSafeRepository::discover_with_environment_overrides(repo_path.gitpath())
5660
.map(Into::into)?;
@@ -79,7 +83,7 @@ pub fn blame_file(
7983
tip,
8084
cache,
8185
&mut resource_cache,
82-
file_path.into(),
86+
&file_path,
8387
options,
8488
)?;
8589

@@ -148,7 +152,7 @@ pub fn blame_file(
148152

149153
let file_blame = FileBlame {
150154
commit_id,
151-
path: file_path.into(),
155+
path: file_path.to_string(),
152156
lines,
153157
};
154158

0 commit comments

Comments
 (0)