Skip directories with .datmanskip files
This commit is contained in:
parent
8612804298
commit
aa2722607e
|
@ -316,6 +316,15 @@ pub fn scan_with_progress_bar(
|
|||
|
||||
for entry in dir_read? {
|
||||
let entry: DirEntry = entry?;
|
||||
|
||||
if entry.file_name() == ".datmanskip" {
|
||||
// Directories with .datmanskip in them are to be skipped entirely.
|
||||
// TODO(perf): should this be checked upfront before some children may already
|
||||
// have been scanned?
|
||||
debug!("Skipping {path:?} because it has a .datmanskip file.");
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
let scanned =
|
||||
scan_with_progress_bar(&entry.path(), progress_bar, one_filesystem, exclusions)?;
|
||||
if let Some(scanned) = scanned {
|
||||
|
|
Loading…
Reference in New Issue