Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Fix PATH modification on Windows

Dmitry Kazakovf99b9f501711
diff --git a/krita/main.cc b/krita/main.cc
index 99a3bb3564..1c361cec43 100644
--- a/krita/main.cc
+++ b/krita/main.cc
@@ -606,11 +606,13 @@ extern "C" MAIN_EXPORT int MAIN_FN(int argc, char **argv)
#ifdef Q_OS_WIN
QDir appdir(KoResourcePaths::getApplicationRoot());
QString path = qgetenv("PATH");
- qputenv("PATH", QFile::encodeName(appdir.absolutePath() + "/bin" + ";"
- + appdir.absolutePath() + "/lib" + ";"
- + appdir.absolutePath() + "/Frameworks" + ";"
- + appdir.absolutePath() + ";"
- + path));
+ qputenv("PATH",
+ QFile::encodeName(
+ QDir::toNativeSeparators(appdir.absolutePath() + "/bin") + ";" +
+ QDir::toNativeSeparators(appdir.absolutePath() + "/lib") + ";" +
+ QDir::toNativeSeparators(appdir.absolutePath()) + ";" +
+ path)
+ );
dbgKrita << "PATH" << qgetenv("PATH");
#endif