From acf38544a88b3797dff8b133e8c41f099c91617e Mon Sep 17 00:00:00 2001 From: "U. Bruhin" Date: Thu, 16 Feb 2017 19:46:07 +0100 Subject: [PATCH] Fix failure when creating qt.conf The creation of the qt.conf file has failed with following error: QIODevice::write (QFile, "app.AppDir/opt/bin/app/../qt.conf"): device not open This was caused by an invalid file path (appending "/../" to a file to get its parent directory is not allowed). Fixed it by cleaning the path with QDir::cleanPath(). --- shared/shared.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/shared.cpp b/shared/shared.cpp index 507e578..8ce7b5a 100644 --- a/shared/shared.cpp +++ b/shared/shared.cpp @@ -985,7 +985,7 @@ void createQtConf(const QString &appDirPath) "Qml2Imports = qml\n"; QString filePath = appDirPath + "/"; // Is picked up when placed next to the main executable - QString fileName = appBinaryPath + "/../qt.conf"; + QString fileName = QDir::cleanPath(appBinaryPath + "/../qt.conf"); QDir().mkpath(filePath);