diff options
author | Katja Marttila <katja.marttila@qt.io> | 2022-02-22 10:46:25 +0200 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2022-02-22 11:58:45 +0200 |
commit | 99b2be3a9403b90678e13c1726eb360a7e43a1d4 (patch) | |
tree | f90de98df2b71af21b97d60ea94584619343ce71 | |
parent | 139438b6ea6b16d6c1de0994e091b444d666ef0d (diff) |
Fix 'Execute' operation arguments with Linux separators4.3.0
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 <iikka.eklund@qt.io>
Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
-rw-r--r-- | src/libs/kdtools/updateoperation.cpp | 13 |
1 files 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); |