Skip to content

Commit

Permalink
Fixed an issue where the output path was formatted wrong on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Toyz committed Jan 1, 2025
1 parent fba0fc0 commit 0a7b621
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,5 @@ fn process(
}

fn strip_windows_prefix(path: &Path) -> PathBuf {
let path_str = path.to_str().unwrap_or_default();
if path_str.starts_with(r"\\?\") {
PathBuf::from(&path_str[4..]) // Remove the \\?\ prefix
} else {
path.to_path_buf()
}
path.to_str().and_then(|s| s.strip_prefix(r"\\?\")).map_or_else(|| path.to_path_buf(), PathBuf::from)
}

0 comments on commit 0a7b621

Please sign in to comment.