mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
[processing] fix path handling (fix #14432)
This commit is contained in:
parent
4815ebd5c2
commit
e873540d14
@ -86,7 +86,7 @@ class GrassUtils:
|
||||
if not isWindows() and not isMac():
|
||||
return ''
|
||||
|
||||
folder = ProcessingConfig.getSetting(GrassUtils.GRASS_FOLDER)
|
||||
folder = ProcessingConfig.getSetting(GrassUtils.GRASS_FOLDER) or ''
|
||||
if not os.path.exists(folder):
|
||||
folder = None
|
||||
if folder is None:
|
||||
@ -110,7 +110,7 @@ class GrassUtils:
|
||||
|
||||
@staticmethod
|
||||
def grassWinShell():
|
||||
folder = ProcessingConfig.getSetting(GrassUtils.GRASS_WIN_SHELL)
|
||||
folder = ProcessingConfig.getSetting(GrassUtils.GRASS_WIN_SHELL) or ''
|
||||
if not os.path.exists(folder):
|
||||
folder = None
|
||||
if folder is None:
|
||||
|
@ -83,7 +83,7 @@ class Grass7Utils:
|
||||
if not isWindows() and not isMac():
|
||||
return ''
|
||||
|
||||
folder = ProcessingConfig.getSetting(Grass7Utils.GRASS_FOLDER)
|
||||
folder = ProcessingConfig.getSetting(Grass7Utils.GRASS_FOLDER) or ''
|
||||
if not os.path.exists(folder):
|
||||
folder = None
|
||||
if folder is None:
|
||||
|
@ -101,24 +101,15 @@ def findOtbLibPath():
|
||||
|
||||
|
||||
def otbLibPath():
|
||||
folder = ProcessingConfig.getSetting(OTB_LIB_FOLDER)
|
||||
if folder is None:
|
||||
folder = ""
|
||||
return folder
|
||||
return ProcessingConfig.getSetting(OTB_LIB_FOLDER) or ''
|
||||
|
||||
|
||||
def otbSRTMPath():
|
||||
folder = ProcessingConfig.getSetting(OTB_SRTM_FOLDER)
|
||||
if folder is None:
|
||||
folder = ""
|
||||
return folder
|
||||
return ProcessingConfig.getSetting(OTB_SRTM_FOLDER) or ''
|
||||
|
||||
|
||||
def otbGeoidPath():
|
||||
filepath = ProcessingConfig.getSetting(OTB_GEOID_FILE)
|
||||
if filepath is None:
|
||||
filepath = ""
|
||||
return filepath
|
||||
return ProcessingConfig.getSetting(OTB_GEOID_FILE) or ''
|
||||
|
||||
|
||||
def otbDescriptionPath():
|
||||
|
Loading…
x
Reference in New Issue
Block a user