10BC0
Skip to content

Commit f875ea9

Browse files
author
Jian Wang
committed
Set default path separator to '/' in MSYS/MSYS2
The environments of MSYS: [[https://www.msys2.org/docs/environments/]]
1 parent 3b2fd15 commit f875ea9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/filesystem.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,11 @@ pub fn strip_current_dir(path: &Path) -> &Path {
128128
pub fn default_path_separator() -> Option<String> {
129129
if cfg!(windows) {
130130
let msystem = env::var("MSYSTEM").ok()?;
131-
match msystem.as_str() {
132-
"MINGW64" | "MINGW32" | "MSYS" => Some("/".to_owned()),
133-
_ => None,
131+
if !msystem.as_str().is_empty() {
132+
return Some("/".to_owned());
134133
}
135-
} else {
136-
None
137134
}
135+
None
138136
}
139137

140138
#[cfg(test)]

0 commit comments

Comments
 (0)
0