]> git.proxmox.com Git - cargo.git/commitdiff
audit-vendor-source: support filesystems with small dirs
authorFabian Grünbichler <debian@fabian.gruenbichler.email>
Sat, 15 Oct 2022 12:09:18 +0000 (14:09 +0200)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Sat, 15 Oct 2022 12:09:18 +0000 (14:09 +0200)
like ZFS, where the tests also match (some) directories with contents,
which fail to delete and are quite noisy.

Signed-off-by: Fabian Grünbichler <debian@fabian.gruenbichler.email>
debian/scripts/audit-vendor-source

index 2e8920ddc1ba7cfa6db1473f4200c4c6f2a7779a..08a46d80499674b11c7db84d6ab5e6b7cd9b2f30 100755 (executable)
@@ -14,7 +14,7 @@ filter_description="$2"
 shift 2 # everything else is args to suspicious-source
 
 # Remove tiny files 4 bytes or less
-find . -size -4c -delete
+find . -size -4c -type f -delete
 # Remove non-suspicious files, warning on patterns that match nothing
 echo "Excluding (i.e. removing) whitelisted files..."
 grep -v '^#' "$whitelist" | xargs  -I% sh -c 'rm -r ./% || true'