summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/entry.rs2
-rw-r--r--src/operations/ls.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/entry.rs b/src/entry.rs
index b59ced5..72eeb7e 100644
--- a/src/entry.rs
+++ b/src/entry.rs
@@ -86,6 +86,6 @@ impl Entry {
impl AsRef<Path> for Entry {
fn as_ref(&self) -> &Path {
- &self.path
+ &self.original_path
}
}
diff --git a/src/operations/ls.rs b/src/operations/ls.rs
index afb0f18..ab07305 100644
--- a/src/operations/ls.rs
+++ b/src/operations/ls.rs
@@ -40,7 +40,7 @@ pub fn traverse_directory(path: impl AsRef<Path>) -> ReadResult<Vec<Entry>> {
for entry in list_directory(path)? {
match entry.entry_type {
EntryType::File => file_entries.push(entry),
- EntryType::Directory => file_entries.extend(traverse_directory(&entry.path)?),
+ EntryType::Directory => file_entries.extend(traverse_directory(entry)?),
}
}
return Ok(file_entries);