Skip to content

Commit

Permalink
Merge pull request #1505 from leuven65/master
Browse files Browse the repository at this point in the history
set default path separator to '/' in UCRT64 of MSYS
  • Loading branch information
tavianator committed Apr 28, 2024
2 parents ae1de4d + f875ea9 commit 9fc2167
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/filesystem.rs
Expand Up @@ -128,13 +128,11 @@ pub fn strip_current_dir(path: &Path) -> &Path {
pub fn default_path_separator() -> Option<String> {
if cfg!(windows) {
let msystem = env::var("MSYSTEM").ok()?;
match msystem.as_str() {
"MINGW64" | "MINGW32" | "MSYS" => Some("/".to_owned()),
_ => None,
if !msystem.as_str().is_empty() {
return Some("/".to_owned());
}
} else {
None
}
None
}

#[cfg(test)]
Expand Down

0 comments on commit 9fc2167

Please sign in to comment.