mirror of
https://github.com/SpaceManiac/SpacemanDMM.git
synced 2025-12-23 05:36:47 +00:00
Handle backslashed paths in the DME on Unix
This commit is contained in:
parent
1a652f39a2
commit
0a3b9c82f3
2 changed files with 3 additions and 2 deletions
|
|
@ -350,7 +350,10 @@ impl Preprocessor {
|
|||
"include" => {
|
||||
expect_token!((path) = Token::String(path));
|
||||
expect_token!(() = Token::Punct(Punctuation::Newline));
|
||||
#[cfg(windows)]
|
||||
let path = PathBuf::from(path);
|
||||
#[cfg(unix)]
|
||||
let path = PathBuf::from(path.replace("\\", "/"));
|
||||
|
||||
for each in vec![
|
||||
self.env_file.parent().unwrap().join(&path),
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@ use std::borrow::Cow;
|
|||
|
||||
#[cfg(unix)]
|
||||
pub fn fix_case(path: &Path) -> Cow<Path> {
|
||||
use std::ascii::AsciiExt;
|
||||
|
||||
if path.exists() {
|
||||
return Cow::Borrowed(path);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue