mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Applied suggestions from @iLLiCiTiT
Ensures that any generated thumbnail files that are empty are removed to prevent issues with subsequent processing or storage.
This commit is contained in:
parent
4ed5039732
commit
9791fda4f6
1 changed files with 7 additions and 0 deletions
|
|
@ -569,6 +569,13 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
|
|||
error)
|
||||
)
|
||||
return None
|
||||
finally:
|
||||
# Remove output file if is empty
|
||||
if (
|
||||
os.path.exists(output_thumb_file_path)
|
||||
and os.path.getsize(output_thumb_file_path) == 0
|
||||
):
|
||||
os.remove(output_thumb_file_path)
|
||||
|
||||
def _get_resolution_arg(
|
||||
self,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue