diff options
author | Saturneric <[email protected]> | 2022-03-12 10:11:12 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-03-12 10:11:12 +0000 |
commit | 7393cd64b42db1f909f295ac9a4291de085b99ce (patch) | |
tree | 01426d2ae53c49b0691b71e15499465734e33b09 | |
parent | <refactor, fix>(core, ui): Some tweaks and fixes (diff) | |
download | GpgFrontend-7393cd64b42db1f909f295ac9a4291de085b99ce.tar.gz GpgFrontend-7393cd64b42db1f909f295ac9a4291de085b99ce.zip |
<fix>(ui): Improve UI experience
1. Unzip only if the target file exists
-rw-r--r-- | src/ui/main_window/MainWindowFileSlotFunction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/main_window/MainWindowFileSlotFunction.cpp b/src/ui/main_window/MainWindowFileSlotFunction.cpp index a3a44e68..97cb6a8d 100644 --- a/src/ui/main_window/MainWindowFileSlotFunction.cpp +++ b/src/ui/main_window/MainWindowFileSlotFunction.cpp @@ -313,7 +313,7 @@ void MainWindow::SlotFileDecrypt() { } // extract the tarball - if (out_path.extension() == ".tar") { + if (out_path.extension() == ".tar" && exists(out_path)) { bool ret = QMessageBox::information( this, _("Decrypting"), _("Do you want to extract and delete the decrypted tarball?"), @@ -690,7 +690,7 @@ void MainWindow::SlotFileDecryptVerify() { } // extract the tarball - if (out_path.extension() == ".tar") { + if (out_path.extension() == ".tar" && exists(out_path)) { bool ret = QMessageBox::information( this, _("Decrypting"), _("Do you want to extract and delete the decrypted tarball?"), |