Skip to content

Commit

Permalink
Merge pull request #15012 from light-and-ray/register_tmp_file-also-w…
Browse files Browse the repository at this point in the history
…ith-mtime

register_tmp_file also for mtime
  • Loading branch information
AUTOMATIC1111 authored Feb 26, 2024
2 parents ca0308b + 3a99824 commit c8a5322
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/ui_tempdir.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ def save_pil_to_file(self, pil_image, dir=None, format="png"):
already_saved_as = getattr(pil_image, 'already_saved_as', None)
if already_saved_as and os.path.isfile(already_saved_as):
register_tmp_file(shared.demo, already_saved_as)
return f'{already_saved_as}?{os.path.getmtime(already_saved_as)}'
filename_with_mtime = f'{already_saved_as}?{os.path.getmtime(already_saved_as)}'
register_tmp_file(shared.demo, filename_with_mtime)
return filename_with_mtime

if shared.opts.temp_dir != "":
dir = shared.opts.temp_dir
Expand Down

0 comments on commit c8a5322

Please sign in to comment.