mirror of
https://github.com/junkfix/config-editor.git
synced 2026-02-22 18:26:40 +01:00
handle chmod for windows
This commit is contained in:
parent
24b07092c6
commit
73d2055a20
|
|
@ -74,7 +74,10 @@ async def websocket_create(hass, connection, msg):
|
|||
if not os.path.isdir(dirnm):
|
||||
os.makedirs(dirnm, exist_ok=True)
|
||||
with AtomicWriter(fullpath, overwrite=True).open() as fdesc:
|
||||
os.fchmod(fdesc.fileno(), 0o644)
|
||||
try:
|
||||
os.fchmod(fdesc.fileno(), 0o644)
|
||||
except:
|
||||
pass
|
||||
fdesc.write(content)
|
||||
except:
|
||||
res = "Saving Failed"
|
||||
|
|
|
|||
Loading…
Reference in a new issue