mirror of
https://github.com/junkfix/config-editor.git
synced 2025-09-21 00:32:10 +02:00
keep old file permission workaround
This commit is contained in:
parent
5616917064
commit
74d9e6efb0
|
@ -90,11 +90,12 @@ async def websocket_create(hass, connection, msg):
|
|||
except:
|
||||
mode = 0o666
|
||||
with AtomicWriter(fullpath, overwrite=True).open() as fdesc:
|
||||
fdesc.write(content)
|
||||
with open(fullpath, 'a') as fdesc:
|
||||
try:
|
||||
os.fchmod(fdesc.fileno(), mode)
|
||||
except:
|
||||
pass
|
||||
fdesc.write(content)
|
||||
except:
|
||||
res = "Saving Failed"
|
||||
_LOGGER.exception(res+": %s", fullpath)
|
||||
|
|
Loading…
Reference in a new issue