Fixed relative path of current_dir

This commit is contained in:
Joshua Barretto
2019-07-02 13:49:56 +01:00
parent 107f5caa34
commit a72c54011a

View File

@ -130,8 +130,7 @@ fn assets_folder() -> PathBuf {
} }
// Working path // Working path
if let Ok(mut path) = std::env::current_dir() { if let Ok(path) = std::env::current_dir() {
path.pop();
paths.push(path); paths.push(path);
} }
@ -150,7 +149,7 @@ fn assets_folder() -> PathBuf {
} }
panic!( panic!(
"Could not find assets folder (tried to search... {})", "Asset directory not found. In attempting to find it, we searched:\n{})",
paths.iter().fold(String::new(), |mut a, path| { paths.iter().fold(String::new(), |mut a, path| {
a += path.to_str().unwrap_or("<invalid>"); a += path.to_str().unwrap_or("<invalid>");
a += "\n"; a += "\n";