From: hickert Date: Fri, 20 Aug 2010 09:19:20 +0000 (+0000) Subject: Do not remove transmitted stat files X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=698feffc81c19c9adde1d6b9aa539c95d1718b4e;p=gosa.git Do not remove transmitted stat files git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19416 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_stats.inc b/gosa-core/include/class_stats.inc index b311baf0f..1523d6d64 100644 --- a/gosa-core/include/class_stats.inc +++ b/gosa-core/include/class_stats.inc @@ -100,7 +100,9 @@ class stats $path = $config->get_cfg_value('core', 'statsDatabaseDirectory'); $dir = opendir($path); while($file = readdir($dir)){ - if(is_file($path.'/'.$file)) $res[] = $file; + if(is_file($path.'/'.$file) && !preg_match('/.old$/', $file)) { + $res[] = $file; + } } } return($res); @@ -326,7 +328,8 @@ class stats sqlite_close(stats::$lastHandle[$filename]); } if(file_exists($path.'/'.$filename)){ - unlink($path.'/'.$filename); + #unlink($path.'/'.$filename); + rename($path.'/'.$filename, $path.'/'.$filename.".old"); } } }