mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-07 07:56:30 +02:00
Fixed recently created bug trying to delete non-existent thumbnail diffs.
This commit is contained in:
@@ -72,7 +72,7 @@ def update_image(tmp_name, png_name):
|
|||||||
if pixels < 0 or pixels > threshold:
|
if pixels < 0 or pixels > threshold:
|
||||||
shutil.copyfile(tmp_name, png_name)
|
shutil.copyfile(tmp_name, png_name)
|
||||||
print(Fore.YELLOW + png_name + " updated" + Fore.WHITE, pixels if pixels > 0 else '')
|
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)
|
os.remove(diff_name)
|
||||||
else:
|
else:
|
||||||
os.utime(png_name, None)
|
os.utime(png_name, None)
|
||||||
|
Reference in New Issue
Block a user