Author: toad
Date: 2007-08-08 20:51:15 +0000 (Wed, 08 Aug 2007)
New Revision: 14541
Modified:
trunk/freenet/src/freenet/node/Node.java
Log:
Read the node backup file from the same directory as the node file! This fixes
node corruption on having to use the backup if current working directory !=
nodeDir.
Thanks foodus.
Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java 2007-08-08 20:47:03 UTC (rev
14540)
+++ trunk/freenet/src/freenet/node/Node.java 2007-08-08 20:51:15 UTC (rev
14541)
@@ -750,7 +750,7 @@
} catch (IOException e) {
try {
System.err.println("Trying to read node file
backup ...");
- readNodeFile(new
File("node-"+getDarknetPortNumber()+".bak").getPath(), random);
+ readNodeFile(new File(nodeDir,
"node-"+getDarknetPortNumber()+".bak").getPath(), random);
} catch (IOException e1) {
System.err.println("No node file or cannot
read, (re)initialising crypto etc");
initNodeFileSettings(random);