diff options
-rw-r--r-- | src/operations/ls.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/operations/ls.rs b/src/operations/ls.rs index 9dd3258..afb0f18 100644 --- a/src/operations/ls.rs +++ b/src/operations/ls.rs @@ -23,7 +23,8 @@ pub fn list_directory(path: impl AsRef<Path>) -> ReadResult<Vec<Entry>>{ let mut entries = Vec::new(); for dir_entry in raise!(std::fs::read_dir(path)) { - let entry = match Entry::from_path(&raise!(dir_entry).path()) { + let entry_path = path.join(raise!(dir_entry).file_name()); + let entry = match Entry::from_path(entry_path) { Ok(v) => v, Err(_) => continue, }; |