]> Devoid-pointer.net GitWeb - anyanka.git/commitdiff
Do not call close on a file that is not open
authorMichal Malý <madcatxster@devoid-pointer.net>
Sat, 18 Apr 2015 00:39:01 +0000 (02:39 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Sat, 18 Apr 2015 00:39:01 +0000 (02:39 +0200)
datafileexporter.cpp

index 54dca7d50b8cf9fa5deb7bca77476dadd31989ab..493c9cae68c891677141df9fb4b922d6ee8319e7 100644 (file)
@@ -80,10 +80,9 @@ exportData(const WriteList& list, const QString& path, const std::string& format
 
     if (file.exists()) {
       int ret = QMessageBox::question(nullptr, "Data export", QString("The selected file \"%1\" already exists. Do you wish to overwrite it?").arg(file.fileName()));
-    if (ret == QMessageBox::No) {
-      file.close();
+    if (ret == QMessageBox::No)
       continue;
-    else
+    else
       file.remove();
     }