From 32f69727e06437b430e66253f60bc1ed2df1b90a Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 17 Apr 2009 21:22:34 +0000 Subject: [PATCH] Skip junk files in include dir --- logrotate/logrotate-lib.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/logrotate/logrotate-lib.pl b/logrotate/logrotate-lib.pl index 38cfdc7ff..e37a8c7e8 100644 --- a/logrotate/logrotate-lib.pl +++ b/logrotate/logrotate-lib.pl @@ -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");