Skip to content

Commit

Permalink
fix: normalize path separators in output on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsen1 committed Jan 19, 2025
1 parent b2d63d3 commit 689bc4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,9 @@ fn write_chunk(
let mut chunk_data = String::new();
for (path, content) in files {
chunk_data.push_str(">>>> ");
#[cfg(windows)]
chunk_data.push_str(&path.replace('\\', "/"));
#[cfg(not(windows))]
chunk_data.push_str(path);
chunk_data.push('\n');
chunk_data.push_str(content);
Expand Down

0 comments on commit 689bc4a

Please sign in to comment.