Skip to content

Commit

Permalink
Fix issue #84 incompatible Win paths
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuelegissi committed Aug 21, 2023
1 parent 5eaa382 commit 271d1b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions qgis2fds_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def set(cls, algo, config, project):
@classmethod
def get(cls, algo, parameters, context, feedback, project):
value = algo.parameterAsFile(parameters, cls.label, context)
value = os.path.join(*value.split("\\")) # Windows safe
project.writeEntry("qgis2fds", cls.label, value)
# Make and check absolute path
project_path = project.absolutePath()
Expand Down Expand Up @@ -277,6 +278,7 @@ def get(cls, algo, parameters, context, feedback, project):
value = None
if parameters.get(cls.label):
value = algo.parameterAsFile(parameters, cls.label, context)
value = os.path.join(*value.split("\\")) # Windows safe
project.writeEntry("qgis2fds", cls.label, value or "") # protect
if value:
# Make and check absolute path
Expand Down Expand Up @@ -350,6 +352,7 @@ def get(cls, algo, parameters, context, feedback, project):
value = None
if parameters.get(cls.label):
value = algo.parameterAsFile(parameters, cls.label, context)
value = os.path.join(*value.split("\\")) # Windows safe
project.writeEntry("qgis2fds", cls.label, value or "") # protect
if value:
# Make and check absolute path
Expand Down Expand Up @@ -595,6 +598,7 @@ def get(cls, algo, parameters, context, feedback, project):
value = None
if parameters.get(cls.label):
value = algo.parameterAsFile(parameters, cls.label, context)
value = os.path.join(*value.split("\\")) # Windows safe
project.writeEntry("qgis2fds", cls.label, value or "") # protect
if value:
# Make and check absolute path
Expand Down

0 comments on commit 271d1b0

Please sign in to comment.