Bug 283215

Summary: KGpg should confirm when exporting a public key will overwrite an existing file
Product: [Applications] kgpg Reporter: Raphael Kubo da Costa <rakuco>
Component: generalAssignee: Rolf Eike Beer <kde>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 2.6.x   
Target Milestone: ---   
Platform: Compiled Sources   
OS: FreeBSD   
Latest Commit: Version Fixed In: 4.7.3

Description Raphael Kubo da Costa 2011-10-03 02:09:21 UTC
Version:           unspecified (using Devel) 
OS:                FreeBSD

Right now, when one launches the "Export Public Key" dialog, chooses to export it to a file and enters an existing file name, KGpg will overwrite the existing file's contents without any confirmation, in some cases leading to data loss.

Reproducible: Always

Steps to Reproduce:
- Create a file somewhere.
- Launch the Export Public Key dialog.
- Choose the "File" option.
- Enter the name of the file which has been created.

Actual Results:  
KGpg will write the contents of the selected key into the file without asking if the file should be overwritten.

Expected Results:  
KGpg asks the user whether he/she really wants to overwrite the contents of the existing file before proceeding.
Comment 1 Rolf Eike Beer 2011-10-21 21:09:17 UTC
Git commit c97530d36fc24221b8ce99abd54b79ebfff495fb by Rolf Eike Beer, on behalf of Luis Ángel Fernández Fernández.
Committed on 21/10/2011 at 21:54.
Pushed by dakon into branch 'KDE/4.7'.

ask the user before overwriting files when exporting keys

Now when the user wants to export the public key to a file and that file
already exists the user is asked about overwriting the file.

BUG:283215
REVIEW:102786
CCMAIL:laffdez@gmail.com

M  +34   -16   keyexport.cpp
M  +13   -10   keyexport.h
M  +119  -112  keyexport.ui
M  +5    -15   keysmanager.cpp

http://commits.kde.org/kgpg/c97530d36fc24221b8ce99abd54b79ebfff495fb