Check that backup image exists

main
bashrc 2026-05-07 13:54:59 +01:00
parent ac4613e7f3
commit 18924e8a24
1 changed files with 5 additions and 3 deletions

View File

@ -1944,9 +1944,11 @@ def _receive_new_post_process(self, post_type: str, path: str, headers: {},
exif_json = [] exif_json = []
print('ERROR: POST media could not be saved to ' + print('ERROR: POST media could not be saved to ' +
post_image_filename) post_image_filename)
erase_file(backup_filename, # remove the original image backup
'EX: failed to delete backup image ' + if is_a_file(backup_filename):
backup_filename) erase_file(backup_filename,
'EX: failed to delete backup image ' +
backup_filename)
else: else:
if is_a_file(filename): if is_a_file(filename):
new_filename = filename.replace('.temp', '') new_filename = filename.replace('.temp', '')