[processing] fixed finding grass folder

This commit is contained in:
volaya 2019-02-24 23:01:18 +01:00 committed by Jürgen Fischer
parent 884d9f688c
commit 2f305c560e

View File

@ -221,7 +221,7 @@ class Grass7Utils:
if "GISBASE" in os.environ:
folder = os.environ["GISBASE"]
else:
testfolder = os.path.join(str(QgsApplication.prefixPath()), 'grass')
testfolder = os.path.join(os.path.dirname(QgsApplication.prefixPath()), 'grass')
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'])
if grassfolders: