]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/backup/files/default/expire-backups
Add IPv6 addresses to dulcy
[chef.git] / cookbooks / backup / files / default / expire-backups
index 81834d43711197c1a129044b68b25f379d98ef96..f05026193ec4c6292d8636f14ff146bc18ff42e4 100644 (file)
@@ -20,7 +20,7 @@ my @dates;
 
 if ($prefix)
 {
-    $prefix = "${prefix}-";
+    $prefix = "\Q${prefix}-\E";
 }
 else
 {
@@ -48,7 +48,7 @@ my $keep = qr/^${prefix}(?:${dates})\./;
 
 opendir(DIR, "$dir") || die "Can't open ${dir}: $!";
 
-my @files = sort(grep($match, readdir(DIR)));
+my @files = sort(grep(/$match/, readdir(DIR)));
 
 closedir(DIR);