[Fix] now gets directory based on working directory instead of executable directory

This commit is contained in:
Alois 2026-05-16 17:15:36 +02:00
commit 505acd4b23

View file

@ -177,9 +177,8 @@ pub fn get_children(path: &str) -> Vec<String> {
}
pub fn get_directory() -> String {
let exe = std::env::current_exe().unwrap_or_else(|_| PathBuf::from("."));
exe.parent()
.unwrap_or(Path::new("."))
std::env::current_dir()
.unwrap_or_else(|_| PathBuf::from("."))
.to_string_lossy()
.to_string()
}