Skip to content

Commit 8e48e97

Browse files
committed
[GRASS] add extension to t.list on windows, fixes possibly #14241
1 parent 0f6a2d1 commit 8e48e97

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/providers/grass/qgsgrass.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1543,6 +1543,9 @@ QStringList QgsGrass::grassObjects( const QgsGrassObject& mapsetObject, QgsGrass
15431543
{
15441544
#if GRASS_VERSION_MAJOR >= 7
15451545
QString cmd = gisbase() + "/scripts/t.list";
1546+
#ifdef Q_OS_WIN
1547+
cmd += ".py";
1548+
#endif
15461549
QStringList arguments;
15471550

15481551
// 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
19681971
module += QString::number( QgsGrass::versionMajor() );
19691972
}
19701973
#ifdef Q_OS_WIN
1971-
module += ".exe";
1974+
if ( !module.endsWith( ".exe", Qt::CaseInsensitive ) && !module.endsWith( ".py", Qt::CaseInsensitive ) )
1975+
{
1976+
module += ".exe";
1977+
}
19721978
#endif
19731979

19741980
// We have to set GISRC file, uff

0 commit comments

Comments
 (0)