Skip to content
Myr

Set default path separator to '/' in MSYS/MSYS2

Before adoption: this commit came in with the history the project adopted, so no landing records it.

The environments of MSYS: [[https://www.msys2.org/docs/environments/]]

authored by Jian Wang · committed by Jian Wang · parent 3b2fd15 · Browse files · 1 file+3 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−5 removed

  • other:+3 added−5 removed

1 file+3 added−5 removed

modified:src/filesystem.rs+3 added-5 removed
126 unmodified lines
127/// platform.128pub fn default_path_separator() -> Option<String> {129 if cfg!(windows) {130 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());133 }135 } else {136 None134 }135 None136}137138#[cfg(test)]139mod tests {
17 unmodified lines