From 99b2be3a9403b90678e13c1726eb360a7e43a1d4 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Tue, 22 Feb 2022 10:46:25 +0200 Subject: Fix 'Execute' operation arguments with Linux separators This bug was caused by the previous change which allowed the Windows separators to be saved to dat file without converting to normalized separators Task-number: QTIFW-2501 Change-Id: Iaeb70da0eaaa5c677c72178fcb8b336bc50a6842 Reviewed-by: Iikka Eklund Reviewed-by: Arttu Tarkiainen --- src/libs/kdtools/updateoperation.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/libs/kdtools/updateoperation.cpp b/src/libs/kdtools/updateoperation.cpp index c3961663a..998d33094 100644 --- a/src/libs/kdtools/updateoperation.cpp +++ b/src/libs/kdtools/updateoperation.cpp @@ -549,21 +549,18 @@ bool UpdateOperation::fromXml(const QDomDocument &doc) if (!e.isNull() && e.tagName() == QLatin1String("argument")) { // Sniff the Execute -operations file path separator. The operation might be // strict with the used path separator + bool useCleanPath = true; if (name() == QLatin1String("Execute")) { if (e.text().startsWith(relocatable) && e.text().size() > relocatable.size()) { const QChar separator = e.text().at(relocatable.size()); if (separator == QLatin1Char('\\')) { - args << QInstaller::replacePath(e.text(), relocatable, - QDir::toNativeSeparators(target), false); + target = QDir::toNativeSeparators(target); + useCleanPath = false; } - } else { - args << QInstaller::replacePath(e.text(), relocatable, - target); } - } else { - args << QInstaller::replacePath(e.text(), relocatable, - target); } + args << QInstaller::replacePath(e.text(), relocatable, + target, useCleanPath); } } setArguments(args); -- cgit v1.2.3