Skip to content
Permalink
Browse files

python's expanduser doesn't necessarily returns utf-8 (followup 4cb37b1)

  • Loading branch information
jef-n committed Oct 12, 2013
1 parent adc850e commit 17fc3e90db0bbdd3fa004700968c13a7e9d57d37
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/core/qgsapplication.cpp
  2. +2 −2 src/python/qgspythonutilsimpl.cpp
@@ -85,7 +85,7 @@ void QgsApplication::init( QString customConfigPath )
{
if ( customConfigPath.isEmpty() )
{
customConfigPath = QDir::homePath() + QString( "/.qgis%1/" ).arg( 2 /* FIXME QGis::QGIS_VERSION_INT / 10000 */ );
customConfigPath = QString( "%1/.qgis%2/" ).arg( QDir::homePath() ).arg( QGis::QGIS_VERSION_INT / 10000 );
}

qRegisterMetaType<QgsGeometry::Error>( "QgsGeometry::Error" );
@@ -487,9 +487,9 @@ QString QgsPythonUtilsImpl::pluginsPath()
QString QgsPythonUtilsImpl::homePythonPath()
{
QString settingsDir = QgsApplication::qgisSettingsDirPath();
if ( QDir::cleanPath( settingsDir ) == QDir::homePath() + QString( "/.qgis%1" ).arg( 2 /* FIXME QGis::QGIS_VERSION_INT / 10000 */ ) )
if ( QDir::cleanPath( settingsDir ) == QDir::homePath() + QString( "/.qgis%1" ).arg( QGis::QGIS_VERSION_INT / 10000 ) )
{
return QString( "os.path.expanduser(\"~/.qgis%1/python\").decode('utf-8')" ).arg( 2 /* FIXME: QGis::QGIS_VERSION_INT / 10000 */ );
return QString( "\"%1/.qgis%2/python\".decode('utf-8')" ).arg( QDir::homePath() ).arg( QGis::QGIS_VERSION_INT / 10000 );
}
else
{

0 comments on commit 17fc3e9

Please sign in to comment.
You can’t perform that action at this time.