diff options
author | Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> | 2020-02-11 10:37:15 +0100 |
---|---|---|
committer | Drashna Jael're <drashna@live.com> | 2020-03-26 00:42:10 -0700 |
commit | c9d18bc22eaabc36f402ffe53f303a6c5e348234 (patch) | |
tree | 504ddf43243c65c589485148d8f023d20d4986ef /lib/python | |
parent | 3ee8f43fd523fb5cb3d737bec26e1712bd682de6 (diff) |
use replace() over rename() to have cross-platform overwriting (#8148)
Diffstat (limited to 'lib/python')
-rw-r--r-- | lib/python/milc.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/python/milc.py b/lib/python/milc.py index 36072ca764..949bb0252a 100644 --- a/lib/python/milc.py +++ b/lib/python/milc.py @@ -571,7 +571,7 @@ class MILC(object): # Move the new config file into place atomically if os.path.getsize(tmpfile.name) > 0: - os.rename(tmpfile.name, str(self.config_file)) + os.replace(tmpfile.name, str(self.config_file)) else: self.log.warning('Config file saving failed, not replacing %s with %s.', str(self.config_file), tmpfile.name) |