Family: Discard old key property so the separator change will happen

This commit is contained in:
zzz
2015-12-20 15:24:35 +00:00
parent cad0ab17dc
commit 879b70617b

View File

@@ -195,11 +195,17 @@ public class StatisticsManager {
if (family.equals(oldRI.getOption(FamilyKeyCrypto.OPT_NAME))) { if (family.equals(oldRI.getOption(FamilyKeyCrypto.OPT_NAME))) {
// copy over the pubkey and signature // copy over the pubkey and signature
key = oldRI.getOption(FamilyKeyCrypto.OPT_KEY); key = oldRI.getOption(FamilyKeyCrypto.OPT_KEY);
if (key != null) if (key != null) {
stats.setProperty(FamilyKeyCrypto.OPT_KEY, key); if (key.contains(";")) {
sig = oldRI.getOption(FamilyKeyCrypto.OPT_SIG); // we changed the separator from ';' to ':'
if (sig != null) key = null;
stats.setProperty(FamilyKeyCrypto.OPT_SIG, sig); } else {
stats.setProperty(FamilyKeyCrypto.OPT_KEY, key);
sig = oldRI.getOption(FamilyKeyCrypto.OPT_SIG);
if (sig != null)
stats.setProperty(FamilyKeyCrypto.OPT_SIG, sig);
}
}
} }
} }
if (sig == null || key == null) { if (sig == null || key == null) {