bin jetzt wach :/

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4729 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
danielr 17 years ago
parent 7bd8601f04
commit 9b03310f8a

@ -536,17 +536,19 @@ public final class yacyVersion implements Comparator<yacyVersion>, Comparable<ya
long now = System.currentTimeMillis();
final long deleteAfterMillis = deleteAfterDays * 24 * 60 * 60000l;
String lastMain = null;
String filename;
for (final yacyVersion aRelease: downloadedreleases) {
filename = aRelease.name;
if(keepMain && aRelease.mainRelease) {
// keep this one, delete last remembered main release file
if(lastMain != null) {
aRelease.name = lastMain;
filename = lastMain;
}
lastMain = aRelease.name;
}
// check file age
File downloadedFile = new File(filesPath + File.separator + aRelease.name);
File downloadedFile = new File(filesPath + File.separator + filename);
if(now - downloadedFile.lastModified() > deleteAfterMillis) {
// delete file
if(!downloadedFile.delete()) {

Loading…
Cancel
Save