From 1f3eaf9f8ef48396c0b31a1a413532b3598cb1f1 Mon Sep 17 00:00:00 2001 From: allo Date: Fri, 3 Feb 2006 21:21:42 +0000 Subject: [PATCH] use DATA/HTDOCS for notifier.gif. Works even if htroot is readonly git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1526 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- ChangeLog | 2 ++ htroot/Messages_p.java | 2 +- htroot/env/templates/header.template | 2 +- htroot/yacy/message.java | 6 ++++-- source/yacy.java | 4 ++-- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 637e4e04c..40d16dc9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,8 @@ version 0.424svn * FIXED: some Filemodes were set wrong (theli) * FIXED: minor bug-fix in Cache for some rare URLs (borg-0300) * ADDED: The YaCy-Bookmarkssystem (allo) + * UPDATED: New Searchstyle + * FIXED: notifier.gif works even when only DATA is writable version 0.40 (8/21/2005): * The Server now provides the virtuel Header IS_ADMIN (Alexander Schier) diff --git a/htroot/Messages_p.java b/htroot/Messages_p.java index 847d8e8fd..fe4ef392c 100644 --- a/htroot/Messages_p.java +++ b/htroot/Messages_p.java @@ -78,7 +78,7 @@ public class Messages_p { // first reset notification File notifierSource = new File(switchboard.getRootPath(), switchboard.getConfig("htRootPath", "htroot") + "/env/grafics/empty.gif"); - File notifierDest = new File(switchboard.getRootPath(), switchboard.getConfig("htRootPath", "htroot") + "/env/grafics/notifier.gif"); + File notifierDest = new File(switchboard.getConfig("htDocsPath", "DATA/HTDOCS"), "notifier.gif"); try { serverFileUtils.copy(notifierSource, notifierDest); } catch (IOException e) { diff --git a/htroot/env/templates/header.template b/htroot/env/templates/header.template index 6f1c22362..7d87ea548 100644 --- a/htroot/env/templates/header.template +++ b/htroot/env/templates/header.template @@ -54,7 +54,7 @@  Home Page  File Share  Wiki -   Messages  +   Messages    Personal Profile diff --git a/htroot/yacy/message.java b/htroot/yacy/message.java index 5d01aa95d..6f7b24f9a 100644 --- a/htroot/yacy/message.java +++ b/htroot/yacy/message.java @@ -58,6 +58,7 @@ import de.anomic.plasma.plasmaSwitchboard; import de.anomic.server.serverFileUtils; import de.anomic.server.serverObjects; import de.anomic.server.serverSwitch; +import de.anomic.server.logging.serverLog; import de.anomic.tools.crypt; import de.anomic.yacy.yacyCore; import de.anomic.yacy.yacySeed; @@ -142,11 +143,12 @@ public final class message { // finally write notification File notifierSource = new File(sb.getRootPath(), sb.getConfig("htRootPath","htroot") + "/env/grafics/message.gif"); - File notifierDest = new File(sb.getRootPath(), sb.getConfig("htRootPath","htroot") + "/env/grafics/notifier.gif"); + File notifierDest = new File(sb.getConfig("htDocsPath", "DATA/HTDOCS"), "notifier.gif"); try { serverFileUtils.copy(notifierSource, notifierDest); } catch (IOException e) { - System.out.println("NEW MESSAGE ARRIVED! (error: " + e.getMessage() + ")"); + serverLog.logSevere("MESSAGE", "NEW MESSAGE ARRIVED! (error: " + e.getMessage() + ")"); + }; } // System.out.println("respond = " + prop.toString()); diff --git a/source/yacy.java b/source/yacy.java index e4242e32f..2adcded86 100644 --- a/source/yacy.java +++ b/source/yacy.java @@ -53,7 +53,6 @@ import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.URL; -import java.util.ConcurrentModificationException; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; @@ -308,9 +307,10 @@ public final class yacy { //final File htTemplatePath = new File(homePath, sb.getConfig("htTemplatePath","htdocs")); // create default notifier picture + //TODO: Use templates instead of copying images ... if (!((new File(htRootPath, "env/grafics/notifier.gif")).exists())) try { serverFileUtils.copy(new File(htRootPath, "env/grafics/empty.gif"), - new File(htRootPath, "env/grafics/notifier.gif")); + new File(htDocsPath, "notifier.gif")); } catch (IOException e) {} if (!(htDocsPath.exists())) htDocsPath.mkdir();