From 698feffc81c19c9adde1d6b9aa539c95d1718b4e Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 20 Aug 2010 09:19:20 +0000 Subject: [PATCH] Do not remove transmitted stat files git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19416 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_stats.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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"); } } } -- 2.30.2