- Don't delete privkey file for a non-persistent client tunnel

(ticket #599)
This commit is contained in:
zzz
2012-02-20 23:19:53 +00:00
parent 939329a96c
commit b8a1ab0138
3 changed files with 7 additions and 3 deletions

View File

@@ -342,7 +342,8 @@ public class IndexBean {
String pk = cur.getPrivKeyFile();
if (pk == null)
pk = _privKeyFile;
if (pk != null && pk.startsWith("i2ptunnel") && pk.endsWith("-privKeys.dat")) {
if (pk != null && pk.startsWith("i2ptunnel") && pk.endsWith("-privKeys.dat") &&
((!isClient(cur.getType())) || cur.getPersistentClientKey())) {
File pkf = new File(_context.getConfigDir(), pk);
if (pkf.exists()) {
String name = cur.getName();