aboutsummaryrefslogtreecommitdiffstats
path: root/wizard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'wizard.cpp')
-rw-r--r--wizard.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/wizard.cpp b/wizard.cpp
index a34817e..5f3d68f 100644
--- a/wizard.cpp
+++ b/wizard.cpp
@@ -193,15 +193,14 @@ bool ImportFromGpg4usbPage::importFormOlderGpg4usb()
return false;
}
- QFile secRing(dir+"/keydb/secring.gpg");
- QFile pubRing(dir+"/keydb/pubring.gpg");
-
- // Return, if no keyrings are found in subdir of chosen dir
- if (!(pubRing.exists() or secRing.exists())) {
- QMessageBox::critical(0, tr("Import Error"), tr("Couldn't locate any keyring file in %1").arg(dir+"/keydb"));
- return false;
+ // try to import keys, if appropriate box is checked, return, if import was unsuccessful
+ if (gpg4usbKeyCheckBox->isChecked()) {
+ if (!Wizard::importPubAndSecKeysFromDir(dir+"/keydb",mKeyMgmt)) {
+ return false;
+ }
}
+ // try to import config, if appropriate box is checked
if (gpg4usbConfigCheckBox->isChecked()) {
importConfFromGpg4usb(dir);