Commit f83150d9 authored by Rashad Kanavath's avatar Rashad Kanavath

check dir exsit for otb install

parent 98215561
......@@ -77,7 +77,7 @@ class OTBAlgorithmProvider(QgsProcessingProvider):
otb_app_dirs = self.otb_app_dir_list(v)
if len(otb_app_dirs) < 1:
self.setActive(False)
raise ValueError(self.tr("Invalid path given for 'OTB application folder'. OTB provider will be disabled"))
raise ValueError(self.tr("'{}' does not exist. OTB provider will be disabled".format(v)))
#isValid is True if there is atleast one valid otb application is given path
isValid = False
......@@ -121,6 +121,8 @@ class OTBAlgorithmProvider(QgsProcessingProvider):
if not self.isActive():
return
if not v or not os.path.exists(v):
self.setActive(False)
raise ValueError(self.tr("'{}' does not exist. OTB provider will be disabled".format(v)))
return
path = self.normalize_path(v)
if not os.path.exists(os.path.join(path,'bin', otb_exe_file('otbApplicationLauncherCommandLine'))):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment