diff --git a/src/dreammaker/preprocessor.rs b/src/dreammaker/preprocessor.rs index 0fa607e6..105bd858 100644 --- a/src/dreammaker/preprocessor.rs +++ b/src/dreammaker/preprocessor.rs @@ -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), diff --git a/src/tools/utils.rs b/src/tools/utils.rs index 6892775b..704b422f 100644 --- a/src/tools/utils.rs +++ b/src/tools/utils.rs @@ -5,8 +5,6 @@ use std::borrow::Cow; #[cfg(unix)] pub fn fix_case(path: &Path) -> Cow { - use std::ascii::AsciiExt; - if path.exists() { return Cow::Borrowed(path); }