From a72c54011a69371c131de5ef3df8bba3acdc41f6 Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Tue, 2 Jul 2019 13:49:56 +0100 Subject: [PATCH] Fixed relative path of current_dir --- common/src/assets/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/src/assets/mod.rs b/common/src/assets/mod.rs index e1281cbd08..8cc6d9b703 100644 --- a/common/src/assets/mod.rs +++ b/common/src/assets/mod.rs @@ -130,8 +130,7 @@ fn assets_folder() -> PathBuf { } // Working path - if let Ok(mut path) = std::env::current_dir() { - path.pop(); + if let Ok(path) = std::env::current_dir() { paths.push(path); } @@ -150,7 +149,7 @@ fn assets_folder() -> PathBuf { } 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| { a += path.to_str().unwrap_or(""); a += "\n";