Skip to content

Commit

Permalink
Fix wrong logic when checking that the DirEntry is a file
Browse files Browse the repository at this point in the history
  • Loading branch information
CongLuanTran committed Dec 26, 2024
1 parent 6ddf3fe commit c88a878
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unix/linux/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ impl ComponentInner {
let dir = read_dir(folder).ok()?;
let mut matchings: HashMap<u32, Component> = HashMap::with_capacity(10);
for entry in dir.flatten() {
if !entry.file_type().is_ok_and(|file_type| file_type.is_dir()) {
if !entry.file_type().is_ok_and(|file_type| !file_type.is_dir()) {
continue;
}

Expand Down

0 comments on commit c88a878

Please sign in to comment.