mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-09 00:04:30 -05:00
[processing] fixed finding grass folder
This commit is contained in:
parent
884d9f688c
commit
2f305c560e
@ -221,7 +221,7 @@ class Grass7Utils:
|
|||||||
if "GISBASE" in os.environ:
|
if "GISBASE" in os.environ:
|
||||||
folder = os.environ["GISBASE"]
|
folder = os.environ["GISBASE"]
|
||||||
else:
|
else:
|
||||||
testfolder = os.path.join(str(QgsApplication.prefixPath()), 'grass')
|
testfolder = os.path.join(os.path.dirname(QgsApplication.prefixPath()), 'grass')
|
||||||
if os.path.isdir(testfolder):
|
if os.path.isdir(testfolder):
|
||||||
grassfolders = sorted([f for f in os.listdir(testfolder) if f.startswith("grass-7.") and os.path.isdir(os.path.join(testfolder, f))], reverse=True, key=lambda x: [int(v) for v in x[len("grass-"):].split('.') if v != 'svn'])
|
grassfolders = sorted([f for f in os.listdir(testfolder) if f.startswith("grass-7.") and os.path.isdir(os.path.join(testfolder, f))], reverse=True, key=lambda x: [int(v) for v in x[len("grass-"):].split('.') if v != 'svn'])
|
||||||
if grassfolders:
|
if grassfolders:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user