Skip to content

Commit

Permalink
[GRASS] add extension to t.list on windows, fixes possibly #14241
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Feb 7, 2016
1 parent 0f6a2d1 commit 8e48e97
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/providers/grass/qgsgrass.cpp
Expand Up @@ -1543,6 +1543,9 @@ QStringList QgsGrass::grassObjects( const QgsGrassObject& mapsetObject, QgsGrass
{
#if GRASS_VERSION_MAJOR >= 7
QString cmd = gisbase() + "/scripts/t.list";

This comment has been minimized.

Copy link
@jef-n

jef-n Feb 8, 2016

Member

shouldn't this be QgsGrassModule::findExec( "t.list" ). That would find the t.list.bat wrapper in bin on windows and also the t.list script in scripts on other platforms.

This comment has been minimized.

Copy link
@blazek

blazek Feb 9, 2016

Author Member

OK, I have moved QgsGrassModule::findExec() to QgsGrass::findModule() and used it in QgsGrass::runModule() in 58beed2.

#ifdef Q_OS_WIN
cmd += ".py";
#endif
QStringList arguments;

// Running t.list module is quite slow (about 500ms) -> check first if temporal db exists.
Expand Down Expand Up @@ -1968,7 +1971,10 @@ QProcess *QgsGrass::startModule( const QString& gisdbase, const QString& locati
module += QString::number( QgsGrass::versionMajor() );
}
#ifdef Q_OS_WIN
module += ".exe";
if ( !module.endsWith( ".exe", Qt::CaseInsensitive ) && !module.endsWith( ".py", Qt::CaseInsensitive ) )
{
module += ".exe";
}
#endif

// We have to set GISRC file, uff
Expand Down

0 comments on commit 8e48e97

Please sign in to comment.