Ensure the directory exists before saving to it
The directory for the images saved with the Save button may still not exist, so it needs to be created prior to opening the log.csv file.
This commit is contained in:
parent
8aead63f1a
commit
57e03cdd24
|
@ -131,6 +131,8 @@ def save_files(js_data, images, do_make_zip, index):
|
|||
images = [images[index]]
|
||||
start_index = index
|
||||
|
||||
os.makedirs(opts.outdir_save, exist_ok=True)
|
||||
|
||||
with open(os.path.join(opts.outdir_save, "log.csv"), "a", encoding="utf8", newline='') as file:
|
||||
at_start = file.tell() == 0
|
||||
writer = csv.writer(file)
|
||||
|
|
Loading…
Reference in New Issue
Block a user