Skip directories with .datmanskip files
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/release Pipeline was successful Details
ci/woodpecker/tag/build Pipeline was successful Details
ci/woodpecker/tag/release Pipeline was successful Details

This commit is contained in:
Olivier 'reivilibre' 2022-07-08 15:35:53 +01:00
parent 8612804298
commit aa2722607e
1 changed files with 9 additions and 0 deletions

View File

@ -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 {