From 7bac504eb60c9783f29632c4f405eb61ca9236c5 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Wed, 13 Nov 2019 14:23:41 +0200 Subject: Fix installer executable creation in Linux If Linux has several partitions and tmp is pointing to a different partition than where we are trying to create installer executable with binarycreator, binarycreator fails with 'Invalid cross-device link'. Fixed so that tmp is not used when creating an installer executable. Change-Id: Ieee52ee1929f980345a7940dd381cc94dbf3d40e Reviewed-by: Iikka Eklund Reviewed-by: Katja Marttila --- tools/binarycreator/binarycreator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/binarycreator/binarycreator.cpp b/tools/binarycreator/binarycreator.cpp index f9a8f31d4..a18690a73 100644 --- a/tools/binarycreator/binarycreator.cpp +++ b/tools/binarycreator/binarycreator.cpp @@ -409,7 +409,8 @@ static int assemble(Input input, const QInstaller::Settings &settings, const QSt } #endif - QTemporaryFile out; + QFile out(generateTemporaryFileName()); + QString targetName = input.outputPath; #ifdef Q_OS_MACOS QDir resourcePath(QFileInfo(input.outputPath).dir()); @@ -470,7 +471,6 @@ static int assemble(Input input, const QInstaller::Settings &settings, const QSt QFile::remove(tempFile); return EXIT_FAILURE; } - out.setAutoRemove(false); #ifndef Q_OS_WIN chmod755(out.fileName()); -- cgit v1.2.3