Skip to content

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

Fixes a Problem with mySeed.txt. If this file is accessible but has no content it will be recreated: http://www.yacy-forum.de/viewtopic.php?p=3657#3657

mkossin3dd3431c5852
diff --git a/source/de/anomic/yacy/yacySeedDB.java b/source/de/anomic/yacy/yacySeedDB.java
index f50b2a082..2488fe54b 100644
--- a/source/de/anomic/yacy/yacySeedDB.java
+++ b/source/de/anomic/yacy/yacySeedDB.java
@@ -109,7 +109,7 @@ public class yacySeedDB {
// create or init own seed
myOwnSeedFile = new File(sb.getRootPath(), sb.getConfig("yacyOwnSeedFile", "mySeed.txt"));
- if (myOwnSeedFile.exists()) {
+ if (myOwnSeedFile.exists() && (myOwnSeedFile.length() > 0)) {
// load existing identity
mySeed = yacySeed.load(myOwnSeedFile);
} else {