Async create this directory too

This commit is contained in:
Luke Murphy 2020-01-21 00:30:04 +01:00
parent 5f21d9290f
commit fc855490cf
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -284,7 +284,8 @@ async def handle_pad(args, padid, data, info, session):
if args.all or (args.meta or args.text or args.html or args.dhtml):
try:
os.makedirs(os.path.split(metapath)[0])
path = trio.Path(os.path.split(metapath)[0])
await path.mkdir()
except OSError:
pass