* I2PTunnel:
- Move the privkey files from the app dir to the config dir, in preparation for splitting the two dirs by default
This commit is contained in:
@ -373,7 +373,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
|
|||||||
|
|
||||||
privKeyFile = new File(args[2]);
|
privKeyFile = new File(args[2]);
|
||||||
if (!privKeyFile.isAbsolute())
|
if (!privKeyFile.isAbsolute())
|
||||||
privKeyFile = new File(_context.getAppDir(), args[2]);
|
privKeyFile = new File(_context.getConfigDir(), args[2]);
|
||||||
if (!privKeyFile.canRead()) {
|
if (!privKeyFile.canRead()) {
|
||||||
l.log("private key file does not exist");
|
l.log("private key file does not exist");
|
||||||
_log.error(getPrefix() + "Private key file does not exist or is not readable: " + args[2]);
|
_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]);
|
privKeyFile = new File(args[2]);
|
||||||
if (!privKeyFile.isAbsolute())
|
if (!privKeyFile.isAbsolute())
|
||||||
privKeyFile = new File(_context.getAppDir(), args[2]);
|
privKeyFile = new File(_context.getConfigDir(), args[2]);
|
||||||
if (!privKeyFile.canRead()) {
|
if (!privKeyFile.canRead()) {
|
||||||
l.log("private key file does not exist");
|
l.log("private key file does not exist");
|
||||||
_log.error(getPrefix() + "Private key file does not exist or is not readable: " + args[2]);
|
_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]);
|
privKeyFile = new File(args[3]);
|
||||||
if (!privKeyFile.isAbsolute())
|
if (!privKeyFile.isAbsolute())
|
||||||
privKeyFile = new File(_context.getAppDir(), args[3]);
|
privKeyFile = new File(_context.getConfigDir(), args[3]);
|
||||||
if (!privKeyFile.canRead()) {
|
if (!privKeyFile.canRead()) {
|
||||||
l.log("private key file does not exist");
|
l.log("private key file does not exist");
|
||||||
_log.error(getPrefix() + "Private key file does not exist or is not readable: " + args[3]);
|
_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]);
|
File privKeyFile = new File(args[1]);
|
||||||
if (!privKeyFile.isAbsolute())
|
if (!privKeyFile.isAbsolute())
|
||||||
privKeyFile = new File(_context.getAppDir(), args[1]);
|
privKeyFile = new File(_context.getConfigDir(), args[1]);
|
||||||
if (!privKeyFile.canRead()) {
|
if (!privKeyFile.canRead()) {
|
||||||
l.log("private key file does not exist");
|
l.log("private key file does not exist");
|
||||||
_log.error(getPrefix() + "Private key file does not exist or is not readable: " + args[3]);
|
_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());
|
File keyFile = new File(getPrivKeyFile());
|
||||||
if (!keyFile.isAbsolute())
|
if (!keyFile.isAbsolute())
|
||||||
keyFile = new File(I2PAppContext.getGlobalContext().getAppDir(), getPrivKeyFile());
|
keyFile = new File(I2PAppContext.getGlobalContext().getConfigDir(), getPrivKeyFile());
|
||||||
if (keyFile.exists()) {
|
if (keyFile.exists()) {
|
||||||
//log("Not overwriting existing private keys in " + keyFile.getAbsolutePath());
|
//log("Not overwriting existing private keys in " + keyFile.getAbsolutePath());
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user