Skip to content

Commit

Permalink
Fix the export path when the server path uses '~' for home directory
Browse files Browse the repository at this point in the history
  • Loading branch information
brichet committed Oct 1, 2024
1 parent 459b18a commit 7aa2d49
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/jupytergis_qgis/jupytergis_qgis/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ def post(self):
elif not virtual_file:
raise HTTPError(400, "The file content is missing")

absolute_path = os.path.join(self.settings["server_root_dir"], path)
absolute_path = os.path.join(
os.path.expanduser(self.settings["server_root_dir"]),
path
)
logs = export_project_to_qgis(absolute_path, virtual_file)
self.finish(json.dumps({
"exported": len(logs["errors"]) == 0,
Expand Down

0 comments on commit 7aa2d49

Please sign in to comment.