summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index e332f41..53e5d33 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1727,7 +1727,6 @@ void ImportKey()
if(metaIsProtoMetaContacts(hContact))
if(MessageBox(0, _T("Do you want load key for all subcontacts ?"), _T("Metacontact detected"), MB_YESNO) == IDYES)
for_all_sub = true;
-
if(metaIsProtoMetaContacts(hContact))
{
HANDLE hcnt = NULL;
@@ -1761,7 +1760,10 @@ void ImportKey()
_tcscat(tmp2, _T("temporary_exported.asc"));
DeleteFile(tmp2);
wfstream f(tmp2, std::ios::out);
- ptmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", _T(""));
+ if(metaIsProtoMetaContacts(hContact))
+ ptmp = UniGetContactSettingUtf(metaGetCurrent(hContact), szGPGModuleName, "GPGPubKey", _T(""));
+ else
+ ptmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", _T(""));
wstring new_key = ptmp;
mir_free(ptmp);
f<<new_key.c_str();