summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-05-18 03:20:47 +0000
committerColin Smith <colin@pfsense.org>2005-05-18 03:20:47 +0000
commit8a4219676ff7a300255cee892c53f2df23a27b8d (patch)
tree1c107245a73f40ada86a283411ee0cee5e3c7b48 /etc/inc
parent7e0e716ac99f1e36bb2ef69e74f272c710c3bb75 (diff)
downloadpfsense-8a4219676ff7a300255cee892c53f2df23a27b8d.zip
pfsense-8a4219676ff7a300255cee892c53f2df23a27b8d.tar.gz
Fix glob pattern.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/config.inc3
1 files changed, 1 insertions, 2 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index ce1e229..ce18221 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -969,12 +969,11 @@ function cleanup_backupcache($revisions = "all") {
if(file_exists($g['cf_conf_path'] . '/backup/backup.cache')) {
$backups = get_backups();
$newbaks = array();
- $bakfiles = glob($g['cf_conf_path'] . "/backup/*");
+ $bakfiles = glob($g['cf_conf_path'] . "/backup/config-*");
$baktimes = $backups['versions'];
$tocache = array();
unset($backups['versions']);
foreach($bakfiles as $backup) { // Check for backups in the directory not represented in the cache.
- if(stristr($backup, 'backup.cache')) continue;
$tocheck = array_shift(explode('.', array_pop(explode('-', $backup))));
if(!in_array($tocheck, $baktimes)) {
$i = true;
OpenPOWER on IntegriCloud