~ruther/qmk_firmware

310b2f1be43a9faa8599f143b459ae43e55393a4 — Mikkel Jeppesen 5 years ago 1fed214
use replace() over rename() to have cross-platform overwriting (#8148)

1 files changed, 1 insertions(+), 1 deletions(-)

M lib/python/milc.py
M lib/python/milc.py => lib/python/milc.py +1 -1
@@ 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)