Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions OMPython/ModelicaSystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,14 +476,14 @@ def setTempDirectory(self, customBuildDirectory: Optional[str | os.PathLike | pa
if customBuildDirectory is not None:
if not os.path.exists(customBuildDirectory):
raise IOError(f"{customBuildDirectory} does not exist")
tempdir = pathlib.Path(customBuildDirectory)
tempdir = pathlib.Path(customBuildDirectory).absolute()
else:
tempdir = pathlib.Path(tempfile.mkdtemp())
tempdir = pathlib.Path(tempfile.mkdtemp()).absolute()
if not tempdir.is_dir():
raise IOError(f"{tempdir} could not be created")

logger.info("Define tempdir as %s", tempdir)
exp = f'cd("{tempdir.absolute().as_posix()}")'
exp = f'cd("{tempdir.as_posix()}")'
self.sendExpression(exp)

return tempdir
Expand Down
Loading