Atomic writes for config fields, don't overwrite intro_time, Node editor allow fixes

This commit is contained in:
zenith 2026-08-03 17:27:47 -04:00
parent 0d3b519a07
commit 5d0ffce51c
5 changed files with 143 additions and 46 deletions

View file

@ -3,6 +3,7 @@ import threading
import RNS
import RNS.vendor.umsgpack as msgpack
from nomadnet.util import write_config_atomic
class InterfaceProfiles:
@ -178,7 +179,7 @@ class InterfaceProfiles:
interfaces[name]["interface_enabled"] = value
if "enabled" in interfaces[name]:
interfaces[name]["enabled"] = value
self.app.rns.config.write()
write_config_atomic(self.app.rns.config)
return True
except Exception as e:
RNS.log("Could not apply interface profile: "+str(e), RNS.LOG_ERROR)