Skip to content

Commit

Permalink
fix: logic in path_utilities.py that doesn't treat Path objects corre…
Browse files Browse the repository at this point in the history
…ctly
  • Loading branch information
moe-ad committed Dec 11, 2024
1 parent 0cb5abb commit fcd1845
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
)

dpf.load_library(
dpf.path_utilities.join(tmp, "plugins", "gltf_plugin"),
dpf.path_utilities.join(str(tmp), "plugins", "gltf_plugin"),
"py_dpf_gltf",
"load_operators",
)
Expand Down Expand Up @@ -244,7 +244,7 @@

print("operator ran successfully")

dpf.download_file(tmp / "out.glb", Path.cwd / "out.glb")
dpf.download_file(tmp / "out.glb", Path.cwd() / "out.glb")

# %%
# You can download :download:`output <images/thumb/out.glb>` from the ``gltf`` operator.
2 changes: 1 addition & 1 deletion src/ansys/dpf/core/path_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def join(*args, **kwargs):
server = None
parts = []
for a in args:
if isinstance(a, (str, Path)) and len(a) > 0:
if isinstance(a, (str, Path)) and len(str(a)) > 0:
parts.append(str(a))
elif isinstance(a, ansys.dpf.core.server_types.LegacyGrpcServer):
server = a
Expand Down

0 comments on commit fcd1845

Please sign in to comment.