diff --git a/retroshare-gui/src/gui/GenCertDialog.cpp b/retroshare-gui/src/gui/GenCertDialog.cpp index ab96e434f..3a6e4a349 100644 --- a/retroshare-gui/src/gui/GenCertDialog.cpp +++ b/retroshare-gui/src/gui/GenCertDialog.cpp @@ -402,8 +402,8 @@ void GenCertDialog::exportIdentity() { QString fname = QFileDialog::getSaveFileName(this,tr("Export profile"), "",tr("RetroShare profile files (*.asc)")) ; - if(fname.isNull()) - return ; + if(fname.isNull()) return ; + if(fname.right(4).toUpper() != ".ASC") fname += ".asc"; QVariant data = ui.genPGPuser->itemData(ui.genPGPuser->currentIndex()); RsPgpId gpg_id (data.toString().toStdString()) ; @@ -416,7 +416,7 @@ void GenCertDialog::exportIdentity() void GenCertDialog::importIdentity() { - QString fname = QFileDialog::getOpenFileName(this,tr("Import profile"), "",tr("RetroShare profile files (*.asc)")) ; + QString fname = QFileDialog::getOpenFileName(this,tr("Import profile"), "",tr("RetroShare profile files (*.asc);;All Files (*)")) ; if(fname.isNull()) return ; diff --git a/retroshare-gui/src/gui/profile/ProfileManager.cpp b/retroshare-gui/src/gui/profile/ProfileManager.cpp index 77a6c2b0b..fb5e0f93d 100644 --- a/retroshare-gui/src/gui/profile/ProfileManager.cpp +++ b/retroshare-gui/src/gui/profile/ProfileManager.cpp @@ -135,9 +135,7 @@ void ProfileManager::exportIdentity() if (fname.isNull()) return; - if (QFileInfo(fname).suffix().isEmpty()) { - fname += ".asc"; - } + if (fname.right(4).toUpper() != ".ASC") fname += ".asc"; if (RsAccounts::ExportIdentity(fname.toUtf8().constData(), gpgId)) QMessageBox::information(this, tr("Identity saved"), tr("Your identity was successfully saved\nIt is encrypted\n\nYou can now copy it to another computer\nand use the import button to load it"));