diff ui/createcertlistdialog.cpp @ 524:a097dd86cb4d

merged.
author Raimund Renkert <rrenkert@intevation.de>
date Tue, 29 Apr 2014 15:26:43 +0200
parents c495dd026d61 9d3880db6ba7
children ccdc4c6b97ce
line wrap: on
line diff
--- a/ui/createcertlistdialog.cpp	Tue Apr 29 15:26:02 2014 +0200
+++ b/ui/createcertlistdialog.cpp	Tue Apr 29 15:26:43 2014 +0200
@@ -258,7 +258,16 @@
         return;
     }
 
-    if (!outputFile.copy(archiveDir.filePath("current_certificates.txt"))) {
+    QString curCerts = archiveDir.filePath("current_certificates.txt");
+
+    if (QFile::exists(curCerts)) {
+        if (!QFile::remove(curCerts)) {
+            showErrorMessage(tr("Failed to update current_certificates.txt"));
+            return;
+        }
+    }
+
+    if (!outputFile.copy(curCerts)) {
         showErrorMessage(tr("Failed to write current_certificates file."));
         return;
     }

http://wald.intevation.org/projects/trustbridge/