Skip to content
Permalink
Browse files

[GRASS] add extension to t.list on windows, fixes possibly #14241

  • Loading branch information
blazek committed Feb 7, 2016
1 parent 0f6a2d1 commit 8e48e97d4a233b523c92e4b9ca84677ab0916e0c
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/providers/grass/qgsgrass.cpp
@@ -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.
@@ -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

0 comments on commit 8e48e97

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