fix(thumbnails): don't re-create thumbnails if they already exist

A previous cleanup introduced a bug which caused thumbnails to be
re-created even if we already had a matching thumbnail in the storage.
This commit is contained in:
Internal Server Error - Gitea: Git with a cup of tea
500 Internal Server Error

Gitea Version: 1.28.0+dev-477-g8b6ad49a5f