Fix image clip webm not being cleaned (#4657)

This commit is contained in:
WithoutPants
2024-03-07 09:03:00 +11:00
committed by GitHub
parent 4614471ad9
commit c7b2314bb1

View File

@@ -652,9 +652,13 @@ func (j *CleanGeneratedJob) getImagesWithHash(ctx context.Context, checksum stri
}
func (j *CleanGeneratedJob) getThumbnailFileHash(basename string) (string, error) {
var hash string
var width int
_, err := fmt.Sscanf(basename, "%32x_%d.jpg", &hash, &width)
var (
hash string
width int
ext string
)
// include the extension - which could be jpg/webp
_, err := fmt.Sscanf(basename, "%32x_%d.%s", &hash, &width, &ext)
if err != nil {
return "", err
}