diff --git a/util/locale_database/localetools.py b/util/locale_database/localetools.py index a7fcd087273..175b04e99c0 100644 --- a/util/locale_database/localetools.py +++ b/util/locale_database/localetools.py @@ -115,7 +115,7 @@ def AtomicRenameTemporaryFile(originalLocation: Path, *, prefix: str, dir: Path) yield tempFile tempFile.close() # Move the modified file to the original location - Path(tempFile.name).rename(originalLocation) + Path(tempFile.name).replace(originalLocation) except Exception: # delete the temporary file in case of error tempFile.close()