keep orphaned cache dirs for one day
authorMichael Andres <ma@suse.de>
Fri, 23 May 2014 10:08:07 +0000 (12:08 +0200)
committerMichael Andres <ma@suse.de>
Tue, 27 May 2014 14:30:30 +0000 (16:30 +0200)
zypp/RepoManager.cc

index 4c64ee4..d82f443 100644 (file)
@@ -1294,7 +1294,7 @@ namespace zypp
             if ( subdir->basename() == r->escaped_alias() )
             { found = true; break; }
 
-          if ( ! found )
+          if ( ! found && ( Date::now()-PathInfo(*subdir).mtime() > Date::day ) )
             filesystem::recursive_rmdir( *subdir );
 
           progress.set( progress.val() + sdircurrent * 100 / sdircount );