summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-02-21 18:13:21 +0100
committertroido <troido@protonmail.com>2020-02-21 18:13:21 +0100
commit60b56b39488f7704f42580363d1343a4dc9732e8 (patch)
tree9dbf0bdb87c0aae448391c0c308458a6fbdd9a91 /src/main.rs
parent07cc6d8919193c38cc13b2567ede5a510938db18 (diff)
make cargo manifest dir only default directory for content
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index a0afece..6da6d57 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -63,7 +63,8 @@ fn main() -> Result<()>{
let mut gameserver = GameServer::new(servers);
- let loader = WorldLoader::new(PathBuf::from_str(&(env!("CARGO_MANIFEST_DIR").to_owned() + "/content/maps/"))?);
+
+ let loader = WorldLoader::new(PathBuf::from_str(&(std::env::var("CARGO_MANIFEST_DIR").unwrap_or(".".to_string()).to_owned() + "/content/maps/"))?);
let storage = FileStorage::new(FileStorage::savedir().expect("couldn't find any save directory"));