fix(Thumb): Don't generate / get thumb for file size equal to 0

pull/1818/head
Sam 2 years ago committed by GitHub
parent ce832bf13d
commit c60cdb1241
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -463,7 +463,7 @@ func (file *File) GetPosition() string {
// `True` does not guarantee the load request will success in next step, but the client
// should try to load and fallback to default placeholder in case error returned.
func (file *File) ShouldLoadThumb() bool {
return file.MetadataSerialized[ThumbStatusMetadataKey] != ThumbStatusNotAvailable
return file.MetadataSerialized[ThumbStatusMetadataKey] != ThumbStatusNotAvailable && file.Size != 0
}
// return sidecar thumb file name

Loading…
Cancel
Save