Skip junk files in include dir
authorJamie Cameron <jcameron@webmin.com>
Fri, 17 Apr 2009 21:22:34 +0000 (21:22 +0000)
committerJamie Cameron <jcameron@webmin.com>
Fri, 17 Apr 2009 21:22:34 +0000 (21:22 +0000)
logrotate/logrotate-lib.pl

index 38cfdc7..e37a8c7 100644 (file)
@@ -84,7 +84,11 @@ while(<$fh>) {
                        local @dirs = sort { $a cmp $b } readdir(DIR);
                        closedir(DIR);
                        foreach $f (@dirs) {
-                               next if ($f =~ /^\./ || $f =~ /\.rpmsave$/ ||
+                               next if ($f =~ /^\./ ||
+                                        $f =~ /\.rpm(save|orig|new)$/ ||
+                                        $f =~ /\~$/ ||
+                                        $f =~ /,v$/ ||
+                                        $f =~ /\.swp$/ ||
                                         $f =~ /\.lock$/);
                                local ($inc, $ilnum, $ifiles) =
                                        &get_config("$incfile/$f");