Skip to content

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

try to fix path too long see http://www.yacy-forum.de/viewtopic.php?p=19079

borg-0300ec21c585cb1e
diff --git a/source/de/anomic/plasma/plasmaCrawlWorker.java b/source/de/anomic/plasma/plasmaCrawlWorker.java
index d2b20d6a1..2a4f9c1f4 100644
--- a/source/de/anomic/plasma/plasmaCrawlWorker.java
+++ b/source/de/anomic/plasma/plasmaCrawlWorker.java
@@ -366,7 +366,14 @@ public final class plasmaCrawlWorker extends Thread {
cacheManager.cachePath.getAbsolutePath() + "').");
return null;
}
-
+
+ if (htCache.cacheFile.getAbsolutePath().length() > 255) {
+ remote.close();
+ log.logInfo("REJECTED URL " + url.toString() + " because path too long '" +
+ cacheManager.cachePath.getAbsolutePath() + "'");
+ return (htCache = null);
+ }
+
// request has been placed and result has been returned. work off response
File cacheFile = cacheManager.getCachePath(url);
try {