diff options
-rw-r--r-- | src/fs/dirlist.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fs/dirlist.rs b/src/fs/dirlist.rs index e3462b2..0621ee1 100644 --- a/src/fs/dirlist.rs +++ b/src/fs/dirlist.rs @@ -76,7 +76,7 @@ impl JoshutoDirList { .enumerate() .find(|(_, e)| e.file_name() == entry.file_name()) .and_then(|(i, _)| Some(i)) - .or(Some(0)) + .or(Some(contents_len - 1)) } None => Some(0), } |