diff --git a/core/src/files/sorter.rs b/core/src/files/sorter.rs index 5149a9ac..386d1bf8 100644 --- a/core/src/files/sorter.rs +++ b/core/src/files/sorter.rs @@ -1,4 +1,4 @@ -use std::{cmp::Ordering, collections::BTreeMap, mem, ops::Deref}; +use std::{cmp::Ordering, collections::BTreeMap, mem}; use config::{manager::SortBy, MANAGER}; use shared::Url; diff --git a/shared/src/fns.rs b/shared/src/fns.rs index 63b3cf96..5b915a98 100644 --- a/shared/src/fns.rs +++ b/shared/src/fns.rs @@ -11,7 +11,10 @@ pub fn expand_path(p: impl AsRef) -> PathBuf { return PathBuf::from_iter([&home, p.as_os_str()]); } } - p.to_path_buf() + if p.is_absolute() { + return p.to_path_buf(); + } + env::current_dir().map_or_else(|_| p.to_path_buf(), |c| c.join(p)) } #[inline]