Browse Source

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().
master
U. Bruhin 8 years ago
parent
commit
acf38544a8
  1. 2
      shared/shared.cpp

2
shared/shared.cpp

@ -985,7 +985,7 @@ void createQtConf(const QString &appDirPath)
"Qml2Imports = qml\n"; "Qml2Imports = qml\n";
QString filePath = appDirPath + "/"; // Is picked up when placed next to the main executable 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); QDir().mkpath(filePath);

Loading…
Cancel
Save