Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
accept also files with other file prefix; used to read 'foreign' cache files
Michael Peter Christen6bb07afcc31d
diff --git a/source/net/yacy/kelondro/blob/ArrayStack.java b/source/net/yacy/kelondro/blob/ArrayStack.javaindex 6437b93e7..e5823db7a 100644--- a/source/net/yacy/kelondro/blob/ArrayStack.java+++ b/source/net/yacy/kelondro/blob/ArrayStack.java@@ -128,7 +128,7 @@ public class ArrayStack implements BLOB {Runtime.getRuntime().availableProcessors(), 100,TimeUnit.MILLISECONDS,new LinkedBlockingQueue<Runnable>(),- new NamePrefixThreadFactory(prefix));+ new NamePrefixThreadFactory(this.prefix));// check existence of the heap directoryif (heapLocation.exists()) {@@ -183,9 +183,9 @@ public class ArrayStack implements BLOB {File f;long maxtime = 0;for (final String file : files) {- if (file.length() >= 22 && file.startsWith(prefix) && file.endsWith(".blob")) {+ if (file.length() >= 22 && file.charAt(this.prefix.length()) == '.' && file.endsWith(".blob")) {try {- d = my_SHORT_MILSEC_FORMATTER.parse(file.substring(prefix.length() + 1, prefix.length() + 18));+ d = my_SHORT_MILSEC_FORMATTER.parse(file.substring(this.prefix.length() + 1, this.prefix.length() + 18));time = d.getTime();if (time > maxtime) maxtime = time;} catch (final ParseException e) {continue;}@@ -194,9 +194,9 @@ public class ArrayStack implements BLOB {// open all blob filesfor (final String file : files) {- if (file.length() >= 22 && file.startsWith(prefix) && file.endsWith(".blob")) {+ if (file.length() >= 22 && file.charAt(this.prefix.length()) == '.' && file.endsWith(".blob")) {try {- d = my_SHORT_MILSEC_FORMATTER.parse(file.substring(prefix.length() + 1, prefix.length() + 18));+ d = my_SHORT_MILSEC_FORMATTER.parse(file.substring(this.prefix.length() + 1, this.prefix.length() + 18));f = new File(heapLocation, file);time = d.getTime();if (time == maxtime && !trimall) {