From d80a39c3a0f1594fc1096874d0b5457cfe2df725 Mon Sep 17 00:00:00 2001 From: Alexander Medvedev Date: Tue, 24 Dec 2024 17:51:40 +0100 Subject: [PATCH] use `env::current_dir()` --- pumpkin-config/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pumpkin-config/src/lib.rs b/pumpkin-config/src/lib.rs index c35d4399..5e82ae33 100644 --- a/pumpkin-config/src/lib.rs +++ b/pumpkin-config/src/lib.rs @@ -128,8 +128,7 @@ trait LoadConfiguration { where Self: Sized + Default + Serialize + DeserializeOwned, { - let exe_path = env::current_exe().unwrap(); - let exe_dir = exe_path.parent().unwrap(); + let exe_dir = env::current_dir().unwrap(); let config_dir = exe_dir.join(CONFIG_ROOT_FOLDER); if !config_dir.exists() { log::debug!("creating new config root folder");