aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsbosrcarch7
1 files changed, 3 insertions, 4 deletions
diff --git a/sbosrcarch b/sbosrcarch
index 7d96c49..d073651 100755
--- a/sbosrcarch
+++ b/sbosrcarch
@@ -1311,11 +1311,10 @@ sub purge_pass_2_wanted {
# helper for purge_mode, removes all files in by-md5
# dirs that aren't listed in %keep_md5sums
sub purge_pass_3_wanted {
- return unless -d $_; # not necessarily necessary...
-
s,^\./,,; # remove leading ./
- my (undef, undef, undef, $md5sum) = split /\//, $_;
- return unless defined $md5sum;
+ my (undef, undef, undef, $md5sum, $filename) = split /\//, $_;
+ return unless defined $md5sum; # only want the last dir...
+ return if defined $filename; # and skip if it's not the dir
if($keep_md5sums{$md5sum}) {
#print "keep md5sum: $md5sum\n";