Skip to content
Snippets Groups Projects
Commit e311398c authored by Krzysztof Mochocki's avatar Krzysztof Mochocki
Browse files

Fix bug with "File exists" when stderr.log already exists and was not a symlink

parent b5bc26c4
No related branches found
No related tags found
1 merge request!73Clive integration related fixes
...@@ -51,8 +51,7 @@ class StreamRepresentation(ContextSync[TextIO]): ...@@ -51,8 +51,7 @@ class StreamRepresentation(ContextSync[TextIO]):
def __create_user_friendly_link(self) -> None: def __create_user_friendly_link(self) -> None:
assert self.dirpath is not None, "dirpath is not set" assert self.dirpath is not None, "dirpath is not set"
user_friendly_link_dst = self.dirpath / f"{self.filename}.log" user_friendly_link_dst = self.dirpath / f"{self.filename}.log"
if user_friendly_link_dst.is_symlink(): user_friendly_link_dst.unlink(missing_ok=True)
user_friendly_link_dst.unlink(missing_ok=True)
user_friendly_link_dst.symlink_to(self.__get_path()) user_friendly_link_dst.symlink_to(self.__get_path())
def __next_filename(self) -> str: def __next_filename(self) -> str:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment