forked from gitea/gitea

Backport #28428 by @KN4CK3R There could be a nil pointer exception if the file is not found because that specific error is suppressed but not handled. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Backport #28428 by @KN4CK3R There could be a nil pointer exception if the file is not found because that specific error is suppressed but not handled. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>