aboutsummaryrefslogtreecommitdiff
path: root/lib/python/milc.py
diff options
context:
space:
mode:
authorMikkel Jeppesen <2756925+Duckle29@users.noreply.github.com>2020-02-11 10:37:15 +0100
committerGitHub <noreply@github.com>2020-02-11 10:37:15 +0100
commit310b2f1be43a9faa8599f143b459ae43e55393a4 (patch)
treec3b79b30246f6dfa8a3604b32d93af06f60b18fa /lib/python/milc.py
parent1fed214490e00e83b958a239c7cb97e98eec763b (diff)
downloadqmk_firmware-310b2f1be43a9faa8599f143b459ae43e55393a4.tar.gz
qmk_firmware-310b2f1be43a9faa8599f143b459ae43e55393a4.zip
use replace() over rename() to have cross-platform overwriting (#8148)
Diffstat (limited to 'lib/python/milc.py')
-rw-r--r--lib/python/milc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/python/milc.py b/lib/python/milc.py
index 36072ca76..949bb0252 100644
--- a/lib/python/milc.py
+++ b/lib/python/milc.py
@@ -571,7 +571,7 @@ class MILC(object):
571 571
572 # Move the new config file into place atomically 572 # Move the new config file into place atomically
573 if os.path.getsize(tmpfile.name) > 0: 573 if os.path.getsize(tmpfile.name) > 0:
574 os.rename(tmpfile.name, str(self.config_file)) 574 os.replace(tmpfile.name, str(self.config_file))
575 else: 575 else:
576 self.log.warning('Config file saving failed, not replacing %s with %s.', str(self.config_file), tmpfile.name) 576 self.log.warning('Config file saving failed, not replacing %s with %s.', str(self.config_file), tmpfile.name)
577 577