Skip to content

Commit 63d84ec

Browse files
author
Hugo Mercier
committed
Fix windows path escaping for QGIS_PLUGINPATH
1 parent ab929a8 commit 63d84ec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/python/qgspythonutilsimpl.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,16 @@ void QgsPythonUtilsImpl::initPython( QgisInterface* interface )
8282
QStringList pluginpaths;
8383
foreach ( QString p, extraPluginsPaths() )
8484
{
85-
#ifdef Q_OS_WIN
86-
p = p.replace( '\\', "\\\\" );
87-
#endif
8885
if ( !QDir( p ).exists() )
8986
{
9087
QgsMessageOutput* msg = QgsMessageOutput::createMessageOutput();
9188
msg->setTitle( QObject::tr( "Python error" ) );
9289
msg->setMessage( QString( QObject::tr( "The extra plugin path '%1' does not exist !" ) ).arg( p ), QgsMessageOutput::MessageText );
9390
msg->showMessage();
9491
}
92+
#ifdef Q_OS_WIN
93+
p = p.replace( '\\', "\\\\" );
94+
#endif
9595
// we store here paths in unicode strings
9696
// the str constant will contain utf8 code (through runString)
9797
// so we call '...'.decode('utf-8') to make a unicode string

0 commit comments

Comments
 (0)