From c69f7a39a3ef5ec25e6262fb95cfdfe9741a2495 Mon Sep 17 00:00:00 2001 From: theli Date: Tue, 24 Jan 2006 08:33:52 +0000 Subject: [PATCH] *) adding a startup-test to avoid running into the unzip bug See: http://www.yacy-forum.de/viewtopic.php?t=1763 http://www.yacy-forum.de/viewtopic.php?t=715 http://www.yacy-forum.de/viewtopic.php?t=1674 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1420 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/yacy.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/source/yacy.java b/source/yacy.java index a6b2fadbc..2c14ef84b 100644 --- a/source/yacy.java +++ b/source/yacy.java @@ -222,6 +222,25 @@ public final class yacy { final File dataFolder = new File(homePath, "DATA"); if (!(dataFolder.exists())) dataFolder.mkdir(); + // Testing if the yacy archive file were unzipped correctly. + // This test is needed because of classfile-names longer than 100 chars + // which could cause problems with incompatible unzip software. + // See: + // - http://www.yacy-forum.de/viewtopic.php?t=1763 + // - http://www.yacy-forum.de/viewtopic.php?t=715 + // - http://www.yacy-forum.de/viewtopic.php?t=1674 + File unzipTest = new File(homePath,"classes/de/anomic/kelondro/kelondroMScoreCluster$reverseScoreIterator.class"); + if (!unzipTest.exists()) { + String errorMsg = "The archive file containing YaCy was not unpacked correctly. " + + "Please use 'GNU-Tar' or upgrade to a newer version of your unzip software.\n" + + "For detailed informations on this bug see: " + + "http://www.yacy-forum.de/viewtopic.php?t=715"; + System.err.println(errorMsg); + serverLog.logSevere("STARTUP", errorMsg); + System.exit(1); + } + + final plasmaSwitchboard sb = new plasmaSwitchboard(homePath, "yacy.init", "DATA/SETTINGS/httpProxy.conf"); // save information about available memory at startup time