add the condition back

This commit is contained in:
Kayla Man 2024-06-05 22:44:16 +08:00
parent 869d336519
commit 5310fd7341

View file

@ -624,9 +624,10 @@ def version_up_current_workfile():
work_root = work_template["directory"].format_strict(data)
file_template = work_template["file"].template
workfile_path = get_last_workfile(
last_workfile_path = get_last_workfile(
work_root, file_template, data, extensions, True
)
if os.path.exists(workfile_path):
workfile_path = version_up(workfile_path)
host.save_workfile(workfile_path)
new_workfile_path = version_up(last_workfile_path)
if os.path.exists(new_workfile_path):
new_workfile_path = version_up(new_workfile_path)
host.save_workfile(new_workfile_path)