r22555 by jghali - Cleanup application path when starting Scribus on Windows

scribus-commit scribus-commit at lists.scribus.net
Thu May 24 18:29:33 UTC 2018


Author: jghali
Date: Thu May 24 18:29:32 2018
New Revision: 22555

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22555
Log:
Cleanup application path when starting Scribus on Windows

Modified:
    trunk/Scribus/scribus/scpaths.cpp

Modified: trunk/Scribus/scribus/scpaths.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22555&path=/trunk/Scribus/scribus/scpaths.cpp
==============================================================================
--- trunk/Scribus/scribus/scpaths.cpp	(original)
+++ trunk/Scribus/scribus/scpaths.cpp	Thu May 24 18:29:32 2018
@@ -97,7 +97,12 @@
 	qDebug() << QString("scpaths: qtplugins=%1").arg(QApplication::libraryPaths().join(":"));
 
 #elif defined(_WIN32)
+	QFileInfo appInfo(qApp->applicationDirPath());
 	QString appPath = qApp->applicationDirPath();
+	QString cleanAppPath = appInfo.canonicalFilePath();
+	if (!cleanAppPath.isEmpty())
+		appPath = cleanAppPath;
+
 	m_shareDir = QString("%1/share/").arg(appPath);
 	m_docDir = QString("%1/share/doc/").arg(appPath);
 	m_fontDir = QString("%1/share/fonts/").arg(appPath);




More information about the scribus-commit mailing list