Commit 21ee78c5dd7cdb920d487fbf33b06626350c9971
1 parent
5d25dd62
Exists in
master
and in
8 other branches
always keeps first file in Remote
Showing
2 changed files
with
8 additions
and
3 deletions
Show diff stats
src/DATA/MANAGER/CleanRemote.php
src/DATA/MANAGER/DDBaseMgr.php
... | ... | @@ -335,10 +335,15 @@ class DDBaseMgr |
335 | 335 | } |
336 | 336 | /* Delete Old Files */ |
337 | 337 | else { |
338 | + $isFirst = true; | |
338 | 339 | foreach (glob("*.gz") as $filename) { |
340 | + if ($isFirst) { // we should always keep first file | |
341 | + touch($filename); | |
342 | + $isFirst = false; | |
343 | + } | |
339 | 344 | $info = stat($filename); |
340 | 345 | if ((time() - $info['atime']) > $GlobalDelta) { |
341 | - //fprintf(STDERR, $filename."\n"); | |
346 | + // fprintf(STDERR, $filename."\n"); | |
342 | 347 | system("TimesUpdate -d ".$time_info." ".$filename); |
343 | 348 | } |
344 | 349 | //fprintf(STDERR, date("Y-m-d",$info['atime'])." - ".date("Y-m-d",$info['mtime'])."\n"); | ... | ... |