diff --git a/gix-blame/src/file/function.rs b/gix-blame/src/file/function.rs index c6572e202d1..b37b3ca1613 100644 --- a/gix-blame/src/file/function.rs +++ b/gix-blame/src/file/function.rs @@ -661,7 +661,16 @@ fn find_path_entry_in_commit( let res = tree_iter.lookup_entry( odb, buf2, - file_path.split(|b| *b == b'/').inspect(|_| stats.trees_decoded += 1), + file_path + .split(|b| { + b == const { + std::path::MAIN_SEPARATOR_STR + .as_bytes() + .first() + .expect("platform path separator not to be empty") + } + }) + .inspect(|_| stats.trees_decoded += 1), )?; stats.trees_decoded -= 1; Ok(res.map(|e| e.oid))