various bug-fixes

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@792 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent 9e2fc7e5fe
commit dc474aa22f

@ -386,7 +386,7 @@ public class SettingsAck_p {
} else {
prop.put("info",14);
prop.put("info_errormsg",error.replaceAll("\n","<br>"));
env.setConfig("seedUploadMethod","none");
//env.setConfig("seedUploadMethod","none");
}
return prop;
}

@ -49,6 +49,7 @@ import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.io.File;
import de.anomic.http.httpHeader;
import de.anomic.plasma.plasmaSwitchboard;
@ -177,7 +178,7 @@ public final class Settings_p {
String uploaderName = (String) uploaderKeys.nextElement();
prop.put("seedUploadMethods_" +count+ "_name", uploaderName);
prop.put("seedUploadMethods_" +count+ "_selected", uploaderName.equals(enabledUploader)?1:0);
prop.put("seedUploadMethods_" +count+ "_file", "yacy/seedUpload/yacySeedUpload" + uploaderName + ".html");
prop.put("seedUploadMethods_" +count+ "_file", new File(env.getRootPath(), "htroot/yacy/seedUpload/yacySeedUpload" + uploaderName + ".html").toString());
yacySeedUploader theUploader = yacyCore.getSeedUploader(uploaderName);
String[] configOptions = theUploader.getConfigurationOptions();

@ -48,6 +48,8 @@
import java.lang.Math;
import java.text.DecimalFormat;
import java.io.File;
import de.anomic.http.httpHeader;
import de.anomic.http.httpdByteCountInputStream;
import de.anomic.http.httpdByteCountOutputStream;
@ -76,7 +78,7 @@ public class Status {
yacyCore.peerActions.updateMySeed();
if (((plasmaSwitchboard) env).adminAuthenticated(header) >= 2) {
prop.put("privateStatusTable","Status_p.inc");
prop.put("privateStatusTable", new File(env.getRootPath(), "htroot/Status_p.inc").toString());
} else {
prop.put("privateStatusTable", "");
}

@ -155,7 +155,7 @@ public final class robotsParser{
plasmaCrawlRobotsTxt.Entry robotsTxt4Host = plasmaSwitchboard.robots.getEntry(urlHostPort);
// if we have not found any data or the data is older than 7 days, we need to load it from the remote server
if ((robotsTxt4Host == null) ||
if ((robotsTxt4Host == null) || (robotsTxt4Host.getLoadedDate() == null) ||
(System.currentTimeMillis() - robotsTxt4Host.getLoadedDate().getTime() > 7*24*60*60*1000)) {
URL robotsURL = null;
// generating the proper url to download the robots txt

@ -364,7 +364,7 @@ public final class httpTemplate {
}else if( (bb & 0xFF) == ps){ //include
String include = "";
String line = "";
keyStream = new ByteArrayOutputStream(); //reset stream
keyStream = new ByteArrayOutputStream(); //reset stream
if(transferUntil(pis, keyStream, iClose)){
String filename = keyStream.toString();
if(filename.startsWith( Character.toString((char)lbr) ) && filename.endsWith( Character.toString((char)rbr) )){ //simple pattern for filename
@ -373,7 +373,7 @@ public final class httpTemplate {
if ((!filename.equals("")) && (!filename.equals(dflt))) {
BufferedReader br = null;
try{
br = new BufferedReader(new InputStreamReader(new FileInputStream( new File("htroot", filename) )));
br = new BufferedReader(new InputStreamReader(new FileInputStream( filename )));
//Read the Include
while( (line = br.readLine()) != null ){
include+=line+de.anomic.server.serverCore.crlfString;

@ -534,7 +534,7 @@ public class ftpc {
err.println(logPrefix + "---- Syntax: GET <remote-file> [<local-file>]");
return true;
}
String remote = (new File(cmd[1])).getName();
String remote = cmd[1]; //(new File(cmd[1])).getName();
File local;
File l;
if (cmd.length == 2) {
@ -1664,15 +1664,15 @@ cd ..
}
// after stream is empty we should get control completion echo
reply = receive();
boolean success = (Integer.parseInt(reply.substring(0, 1)) == 2);
//reply = receive();
//boolean success = (Integer.parseInt(reply.substring(0, 1)) == 2);
// shutdown connection
outFile.close();
ClientStream.close();
data.close();
if (!success) throw new IOException(reply);
//if (!success) throw new IOException(reply);
// write statistics
long stop = GregorianCalendar.getInstance(GMTTimeZone).getTime().getTime();
@ -1910,11 +1910,12 @@ cd ..
String account, String password) {
try {
ftpc c = new ftpc();
if (remoteFile.length() == 0) remoteFile = "/";
c.exec("open " + host, false);
c.exec("user " + account + " " + password, false);
c.exec("lcd " + localPath.toString(), false);
c.exec("lcd " + localPath.getAbsolutePath().toString(), false);
c.exec("binary", false);
c.exec("get " + remoteFile, false);
c.exec("get " + remoteFile + " " + localPath.getAbsoluteFile().toString(), false);
c.exec("close", false);
c.exec("exit", false);
} catch (java.security.AccessControlException e) {

Loading…
Cancel
Save