[Fix] use working directory instead of executable directory
This commit is contained in:
parent
b02795b80c
commit
8451b64bea
1 changed files with 2 additions and 3 deletions
|
|
@ -163,9 +163,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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue