Let save_options create folder if it doesn't exist

This commit is contained in:
rasmusvt 2022-07-05 16:37:31 +02:00
parent da7099a924
commit 5e2cef2cde

View file

@ -25,6 +25,10 @@ def save_options(options, path, ignore=None):
options_copy[i] = 'Removed'
if not os.path.isdir(os.path.dirname(path)):
os.makedirs(os.path.dirname(path))
with open(path, 'w') as f:
json.dump(options_copy,f, skipkeys=True, indent=4)