From 3d3c1d50c3d8641783600936866a23fc03077b02 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 11 Oct 2016 18:02:20 +0200 Subject: [PATCH] Changed: Abort if operation failed --- .../ryzom_installer/src/operationdialog.cpp | 31 ++++--------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp index 4213bec73..a1b8d813d 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp @@ -558,12 +558,7 @@ void COperationDialog::extractDownloadedData() extractor.setSourceFile(config->getInstallationDirectory() + "/" + server.dataDownloadFilename); extractor.setDestinationDirectory(dest); - if (extractor.exec()) - { - } - else - { - } + if (!extractor.exec()) return; emit done(); } @@ -593,12 +588,7 @@ void COperationDialog::extractDownloadedClient() extractor.setSourceFile(config->getInstallationDirectory() + "/" + config->expandVariables(server.clientDownloadFilename)); extractor.setDestinationDirectory(destinationDirectory); - if (extractor.exec()) - { - } - else - { - } + if (!extractor.exec()) return; launchUpgradeScript(destinationDirectory, server.clientFilename); @@ -626,12 +616,7 @@ void COperationDialog::copyDataFiles() copier.setDestinationDirectory(server.getDirectory()); copier.setIncludeFilter(serverFiles); - if (copier.exec()) - { - } - else - { - } + if (!copier.exec()) return; emit done(); } @@ -661,12 +646,7 @@ void COperationDialog::copyProfileFiles() copier.setDestinationDirectory(profile.getDirectory()); copier.setIncludeFilter(profileFiles); - if (copier.exec()) - { - } - else - { - } + if (!copier.exec()) return; // correct path to client_default.cfg profile.createClientConfig(); @@ -688,7 +668,8 @@ void COperationDialog::extractBnpClient() CFilesExtractor extractor(this); extractor.setSourceFile(config->getSrcServerClientBNPFullPath()); extractor.setDestinationDirectory(destinationDirectory); - extractor.exec(); + + if (!extractor.exec()) return; launchUpgradeScript(destinationDirectory, server.clientFilename);