From bb6caa346cb4207e38d7ddf9bacf361e6c68e117 Mon Sep 17 00:00:00 2001 From: Lotus Date: Thu, 11 Jul 2013 21:50:06 +0200 Subject: [PATCH] Do not allow automatic update in case YaCy is installed to the Program Files folder on Windows. There are no permissions to write that folder and update would fail. --- htroot/ConfigUpdate_p.html | 2 ++ htroot/ConfigUpdate_p.java | 3 +++ 2 files changed, 5 insertions(+) diff --git a/htroot/ConfigUpdate_p.html b/htroot/ConfigUpdate_p.html index 2b8974697..09de4690c 100644 --- a/htroot/ConfigUpdate_p.html +++ b/htroot/ConfigUpdate_p.html @@ -118,6 +118,8 @@

manual update:
apt-get update && apt-get install yacy

automatic update: add the following line to /etc/crontab
0 6 * * * root apt-get update && apt-get -y --force-yes install yacy

:: +

YaCy has been installed to the Program Files directory. Automatic update is not possible.
Download and install the latest version from the web page http://www.yacy.net/

+ :: #(/candeploy)# #%env/templates/footer.template%# diff --git a/htroot/ConfigUpdate_p.java b/htroot/ConfigUpdate_p.java index 8f156ac96..71bcdd7d5 100644 --- a/htroot/ConfigUpdate_p.java +++ b/htroot/ConfigUpdate_p.java @@ -55,6 +55,9 @@ public class ConfigUpdate_p { if (yacyBuildProperties.isPkgManager()) { prop.put("candeploy", "2"); return prop; + } else if (OS.isWindows && sb.appPath.toString().indexOf("Program Files") > -1) { + prop.put("candeploy", "3"); + return prop; } else if (OS.canExecUnix || OS.isWindows) { // we can deploy a new system with (i.e.) // cd DATA/RELEASE;tar xfz $1;cp -Rf yacy/* ../../;rm -Rf yacy