From e4d3407be5ec2452890c0a8cef7095f67ebf011f Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 20 Sep 2016 18:35:31 +0200 Subject: [PATCH] Changed: Fix the temporary directory, see #279 --HG-- branch : develop --- code/ryzom/tools/client/ryzom_installer/src/main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/main.cpp b/code/ryzom/tools/client/ryzom_installer/src/main.cpp index 9bbb26e50..3902296ec 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/main.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/main.cpp @@ -161,13 +161,16 @@ int main(int argc, char *argv[]) foreach(const QString &dir, dirs) { - QDir(dir).removeRecursively(); + // delete each directory + QDir dirToRemove(tempDir); + dirToRemove.cd(dir); + dirToRemove.removeRecursively(); } tempPath += QString("/ryzom_installer_%1").arg(QDateTime::currentMSecsSinceEpoch()); // copy installer and required files to TEMP directory - if (copyInstallerFiles(config.getInstallerRequiredFiles(), tempPath)) + if (QDir().mkdir(tempPath) && copyInstallerFiles(config.getInstallerRequiredFiles(), tempPath)) { QString tempFile = tempPath + "/" + QFileInfo(QApplication::applicationFilePath()).fileName();