We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3627907 commit 1f8093cCopy full SHA for 1f8093c
jupytercad_freecad/handlers.py
@@ -32,7 +32,15 @@ class JCadExportHandler(APIHandler):
32
def post(self):
33
body = self.get_json_body()
34
35
- file_name = body["path"].split(":")[1]
+ # Works with both prefixed and unprefixed paths
36
+ path = body.get("path", "")
37
+ parts = path.split(":", 1)
38
+
39
+ if len(parts) == 2:
40
+ file_name = parts[1]
41
+ else:
42
+ file_name = parts[0] # fallback: treat whole thing as path
43
44
export_name = body["newName"]
45
46
root_dir = Path(self.contents_manager.root_dir).resolve()
0 commit comments