Fix Import and Export Cert file *.asc.

This commit is contained in:
Phenom 2016-07-31 21:03:45 +02:00
parent edce1e953c
commit d000d75a38
2 changed files with 4 additions and 6 deletions

View File

@ -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 ;

View File

@ -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"));