summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@digia.com>2014-07-15 13:50:47 +0200
committerKarsten Heimrich <karsten.heimrich@digia.com>2014-07-15 20:15:34 +0200
commit0b9cd7ff849769ad543e1fdc5a1d4514c099b009 (patch)
treed2392a64a93b576bcbf938187407eb9118afaa71 /tools
parentbf83f72c0f1fbecd8007cad39df9b6cfdc3bd85e (diff)
Move permissions handling after rename.
At least on Linux we lost the executable permission while doing a rename before setPermissions(...). Not so urgent in these cases, though more correct. Change-Id: Ibb1ca9f04fe94732ff22afd004fbf921255df690 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/devtool/binaryreplace.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/devtool/binaryreplace.cpp b/tools/devtool/binaryreplace.cpp
index f170059f7..a7213ecfe 100644
--- a/tools/devtool/binaryreplace.cpp
+++ b/tools/devtool/binaryreplace.cpp
@@ -134,8 +134,6 @@ int BinaryReplace::replace(const QString &source, const QString &target)
QFile installerBaseOld(QDir(bundlePath).filePath(bundlePath
+ QLatin1String("/Contents/MacOS/") + QFileInfo(bundlePath).completeBaseName()));
#endif
- installerBaseNew.setPermissions(installerBaseOld.permissions());
-
QFile backup(installerBaseOld.fileName() + QLatin1String(".bak"));
if (backup.exists() && (!backup.remove())) {
std::cerr << qPrintable(QString::fromLatin1("Could not delete '%1'. %2")
@@ -155,6 +153,7 @@ int BinaryReplace::replace(const QString &source, const QString &target)
<< std::endl;
} else {
result = EXIT_SUCCESS;
+ installerBaseNew.setPermissions(installerBaseOld.permissions());
}
} catch (const QInstaller::Error &error) {
std::cerr << qPrintable(error.message()) << std::endl;