Fix: Permissions

Stop incorrect reporting of "Did not have permissions" this would
happen where dust is called with a file instead of a directory.

https://github.com/bootandy/dust/issues/241

todo: add test
This commit is contained in:
andy.boot
2022-08-18 16:30:21 +01:00
parent b62f35291d
commit 2713445ad0
+3
View File
@@ -170,8 +170,11 @@ fn walk(
})
.collect();
} else {
// Handle edge case where dust is called with a file instead of a directory
if !dir.exists() {
permissions_flag.store(true, atomic::Ordering::Relaxed);
}
}
build_node(
dir,
children,