wrestling with permissions

This commit is contained in:
Sean Dockray 2020-06-04 23:27:32 +10:00
parent 7cfd757a49
commit c802904abc
1 changed files with 2 additions and 1 deletions

View File

@ -167,7 +167,8 @@ def notion_to_md(id, filepath=None, yaml_func=None):
page_content = page_data["header"] + page_data["markdown"]
# print(page_data)
if filepath:
with open(filepath, 'w') as f:
os.umask(0)
with open(os.open(filepath, os.O_CREAT | os.O_WRONLY, 0o777), 'w') as f:
f.write(page_content)
return page_data