Fix tmp file names

This commit is contained in:
Joscha 2021-05-13 19:36:46 +02:00
parent 0acdee15a0
commit 6bd6adb977

View File

@ -228,7 +228,7 @@ class OutputDirectory:
def _tmp_path(self, base: Path, suffix_length: int) -> Path: def _tmp_path(self, base: Path, suffix_length: int) -> Path:
prefix = "" if base.name.startswith(".") else "." prefix = "" if base.name.startswith(".") else "."
suffix = random.choices(SUFFIX_CHARS, k=suffix_length) suffix = "".join(random.choices(SUFFIX_CHARS, k=suffix_length))
name = f"{prefix}{base.name}.tmp.{suffix}" name = f"{prefix}{base.name}.tmp.{suffix}"
return base.parent / name return base.parent / name