summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyohei Uto <im@kyoheiu.dev>2024-03-02 15:05:49 +0900
committerKyohei Uto <im@kyoheiu.dev>2024-03-02 15:05:49 +0900
commitbe1b9271ad864e5ff98376f501b6d5cac536cd8d (patch)
tree934d124233fe89d8ccbfd0bcb7436867e562470e
parent85bad8e5b91cdc1b81397ec7fea63bd295a08ce2 (diff)
Show items linked to directory in the directory sectionfeature/symlink-dir
-rw-r--r--src/state.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/state.rs b/src/state.rs
index 6b0ec76..91bfd70 100644
--- a/src/state.rs
+++ b/src/state.rs
@@ -1205,7 +1205,14 @@ impl State {
}
match entry.file_type {
FileType::Directory => dir_v.push(entry),
- FileType::File | FileType::Symlink => file_v.push(entry),
+ FileType::File => file_v.push(entry),
+ FileType::Symlink => {
+ if entry.symlink_dir_path.is_some() {
+ dir_v.push(entry);
+ } else {
+ file_v.push(entry);
+ }
+ }
}
}