summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyohei Uto <im@kyoheiu.dev>2024-03-02 15:10:02 +0900
committerGitHub <noreply@github.com>2024-03-02 15:10:02 +0900
commitb1e69d6d4479f4f9a8eb044d00dc4967bbd262c1 (patch)
treef61277a8d77547907a2e0098783faeab4918c99c
parent22814b5db9564297cee61b3eeb754abb55a18e54 (diff)
parentbe1b9271ad864e5ff98376f501b6d5cac536cd8d (diff)
Merge pull request #287 from kyoheiu/feature/symlink-dir
Show items linked to directory in the directory section
-rw-r--r--src/state.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/state.rs b/src/state.rs
index 3a4c6c6..23c17dc 100644
--- a/src/state.rs
+++ b/src/state.rs
@@ -1207,7 +1207,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);
+ }
+ }
}
}