mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-03-14 19:59:45 +01:00
Fixed recently created bug trying to delete non-existent thumbnail diffs.
This commit is contained in:
parent
ec49ce1a6c
commit
24b391578b
@ -72,7 +72,7 @@ def update_image(tmp_name, png_name):
|
||||
if pixels < 0 or pixels > threshold:
|
||||
shutil.copyfile(tmp_name, png_name)
|
||||
print(Fore.YELLOW + png_name + " updated" + Fore.WHITE, pixels if pixels > 0 else '')
|
||||
if png_name.endswith('_tn.png'):
|
||||
if png_name.endswith('_tn.png') and os.path.isfile(diff_name):
|
||||
os.remove(diff_name)
|
||||
else:
|
||||
os.utime(png_name, None)
|
||||
|
Loading…
x
Reference in New Issue
Block a user