diff options
author | Ben Bridle <bridle.benjamin@gmail.com> | 2024-06-30 16:57:16 +1200 |
---|---|---|
committer | Ben Bridle <bridle.benjamin@gmail.com> | 2024-06-30 16:57:25 +1200 |
commit | c23f1eda935a514b886b79f85ce0dab3080c33ef (patch) | |
tree | 469d30c1ec6a17033c2ca173e2120b77e1b98192 | |
parent | 1380a14177fc07f9d09df937b20487137aab4d4f (diff) | |
download | bedrock-pc-c23f1eda935a514b886b79f85ce0dab3080c33ef.zip |
Fix crash when loading a directory containing weird entries
It was previously assumed that every entry in a directory would be
either a file or a directory, but a non-file and non-directory entry
has been encountered in the wild. In this case, just ignore the file,
leaving it out of the directory listing.
-rw-r--r-- | src/devices/file/directory_listing.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/file/directory_listing.rs b/src/devices/file/directory_listing.rs index 9d538bd..0709fc3 100644 --- a/src/devices/file/directory_listing.rs +++ b/src/devices/file/directory_listing.rs @@ -41,7 +41,7 @@ impl DirectoryListing { } else if metadata.is_dir() { EntryType::Directory } else { - unreachable!(); + continue; }, } ) } |