Skip to content

Commit f5e9ff8

Browse files
committed
Adapt path to server os
1 parent 654e0ec commit f5e9ff8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/ansys/dpf/core/server_types.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import ctypes
3535
import io
3636
import os
37-
from pathlib import Path
37+
from pathlib import Path, PurePosixPath, PureWindowsPath
3838
import socket
3939
import subprocess
4040
import sys
@@ -710,22 +710,25 @@ def __del__(self):
710710
warnings.warn(traceback.format_exc())
711711

712712
def start_debug(self, folder_path: str | Path):
713-
"""Start writing server debug information within the given folder.
713+
"""Start writing server-side debug information within the given folder.
714714
715715
Parameters
716716
----------
717717
folder_path:
718-
Path to a folder where to write server debug info.
718+
Path to a folder server-side where to write debug info.
719719
720720
"""
721+
folder_path = (
722+
PurePosixPath(folder_path) if self.os == "posix" else PureWindowsPath(folder_path)
723+
)
721724
api = self.get_api_for_type(
722725
capi=data_processing_capi.DataProcessingCAPI,
723726
grpcapi=data_processing_grpcapi.DataProcessingGRPCAPI,
724727
)
725728
api.data_processing_set_debug_trace(text=str(folder_path))
726729

727730
def stop_debug(self):
728-
"""Stop writing server debug information."""
731+
"""Stop writing server-side debug information."""
729732
api = self.get_api_for_type(
730733
capi=data_processing_capi.DataProcessingCAPI,
731734
grpcapi=data_processing_grpcapi.DataProcessingGRPCAPI,

0 commit comments

Comments
 (0)