Skip to content

Commit

Permalink
make path absolute to use it as variablepath
Browse files Browse the repository at this point in the history
  • Loading branch information
signedav committed Dec 5, 2024
1 parent bb20149 commit 31784e2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions toppingmaker/projecttopping.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,11 +435,13 @@ def make_items(

# if it's defined as path variable, we have to expose it as toppingfile
if variable_key in export_settings.path_variables:
os.makedirs(self.temporary_toppingfile_dir, exist_ok=True)
temporary_toppingfile_path = os.path.join(
self.temporary_toppingfile_dir, os.path.basename(variable_value)
)
variable_item["value"] = temporary_toppingfile_path
path = variable_value
if project.homePath() and not os.path.isabs(variable_value):
# if it's a saved project and the path is not absolute, make it absolute
path = os.path.join(
variable_value, project.homePath(), variable_value
)
variable_item["value"] = path
variable_item["ispath"] = True
else:
variable_item["value"] = variable_value
Expand Down

0 comments on commit 31784e2

Please sign in to comment.