[Fix] now gets directory based on working directory instead of executable directory
This commit is contained in:
parent
a6f5a10582
commit
505acd4b23
1 changed files with 2 additions and 3 deletions
|
|
@ -177,9 +177,8 @@ pub fn get_children(path: &str) -> Vec<String> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_directory() -> String {
|
pub fn get_directory() -> String {
|
||||||
let exe = std::env::current_exe().unwrap_or_else(|_| PathBuf::from("."));
|
std::env::current_dir()
|
||||||
exe.parent()
|
.unwrap_or_else(|_| PathBuf::from("."))
|
||||||
.unwrap_or(Path::new("."))
|
|
||||||
.to_string_lossy()
|
.to_string_lossy()
|
||||||
.to_string()
|
.to_string()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue