Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lightning-persister/src/fs_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -560,15 +560,15 @@ fn dir_entry_is_key(dir_entry: &fs::DirEntry) -> Result<bool, lightning::io::Err
}
}

let metadata = dir_entry.metadata()?;
let file_type = dir_entry.file_type()?;

// We allow the presence of directories in the empty primary namespace and just skip them.
if metadata.is_dir() {
if file_type.is_dir() {
return Ok(false);
}

// If we otherwise don't find a file at the given path something went wrong.
if !metadata.is_file() {
if !file_type.is_file() {
debug_assert!(
false,
"Failed to list keys at path {}: file couldn't be accessed.",
Expand Down
Loading