From 4d005349a7f8e5ace8e14c6a4e5ac8f0189a94f0 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Thu, 6 Aug 2009 18:59:06 +0000 Subject: [PATCH] * I2PTunnel: - Move the privkey files from the app dir to the config dir, in preparation for splitting the two dirs by default --- apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnel.java | 8 ++++---- .../java/src/net/i2p/i2ptunnel/TunnelController.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnel.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnel.java index e4f8453bc7..0b2d2d7c0f 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnel.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnel.java @@ -373,7 +373,7 @@ public class I2PTunnel implements Logging, EventDispatcher { privKeyFile = new File(args[2]); if (!privKeyFile.isAbsolute()) - privKeyFile = new File(_context.getAppDir(), args[2]); + privKeyFile = new File(_context.getConfigDir(), args[2]); if (!privKeyFile.canRead()) { l.log("private key file does not exist"); _log.error(getPrefix() + "Private key file does not exist or is not readable: " + args[2]); @@ -422,7 +422,7 @@ public class I2PTunnel implements Logging, EventDispatcher { privKeyFile = new File(args[2]); if (!privKeyFile.isAbsolute()) - privKeyFile = new File(_context.getAppDir(), args[2]); + privKeyFile = new File(_context.getConfigDir(), args[2]); if (!privKeyFile.canRead()) { l.log("private key file does not exist"); _log.error(getPrefix() + "Private key file does not exist or is not readable: " + args[2]); @@ -481,7 +481,7 @@ public class I2PTunnel implements Logging, EventDispatcher { privKeyFile = new File(args[3]); if (!privKeyFile.isAbsolute()) - privKeyFile = new File(_context.getAppDir(), args[3]); + privKeyFile = new File(_context.getConfigDir(), args[3]); if (!privKeyFile.canRead()) { l.log("private key file does not exist"); _log.error(getPrefix() + "Private key file does not exist or is not readable: " + args[3]); @@ -877,7 +877,7 @@ public class I2PTunnel implements Logging, EventDispatcher { File privKeyFile = new File(args[1]); if (!privKeyFile.isAbsolute()) - privKeyFile = new File(_context.getAppDir(), args[1]); + privKeyFile = new File(_context.getConfigDir(), args[1]); if (!privKeyFile.canRead()) { l.log("private key file does not exist"); _log.error(getPrefix() + "Private key file does not exist or is not readable: " + args[3]); diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java index 6efff96e59..b5ca6c3a11 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java @@ -73,7 +73,7 @@ public class TunnelController implements Logging { File keyFile = new File(getPrivKeyFile()); if (!keyFile.isAbsolute()) - keyFile = new File(I2PAppContext.getGlobalContext().getAppDir(), getPrivKeyFile()); + keyFile = new File(I2PAppContext.getGlobalContext().getConfigDir(), getPrivKeyFile()); if (keyFile.exists()) { //log("Not overwriting existing private keys in " + keyFile.getAbsolutePath()); return; -- GitLab