I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 4d005349 authored by zzz's avatar zzz
Browse files

* I2PTunnel:

      - Move the privkey files from the app dir to the
        config dir, in preparation for splitting the two
        dirs by default
parent c65a9788
No related branches found
No related tags found
No related merge requests found
......@@ -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]);
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment