Merge pull request #1505 from leuven65/master

set default path separator to '/' in UCRT64 of MSYS
This commit is contained in:
Tavian Barnes 2024-04-28 17:23:43 -04:00 committed by GitHub
commit 9fc2167cf9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 5 deletions

View File

@ -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)]