Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

bin jetzt wach :/

danielr9b03310f8a95
diff --git a/source/de/anomic/yacy/yacyVersion.java b/source/de/anomic/yacy/yacyVersion.java
index 7ab192a42..676760381 100644
--- a/source/de/anomic/yacy/yacyVersion.java
+++ b/source/de/anomic/yacy/yacyVersion.java
@@ -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()) {