Fix error handling for #1916

This commit is contained in:
Gabe Kangas 2022-12-16 20:28:08 -08:00
parent 49e60ab56b
commit d5fd1bf169
No known key found for this signature in database
GPG Key ID: 4345B2060657F330

View File

@ -92,7 +92,10 @@ func SetupEmojiDirectory() (err error) {
continue continue
} }
memFile, err := staticFS.Open(path.path) memFile, staticOpenErr := staticFS.Open(path.path)
if staticOpenErr != nil {
return errors.Wrap(staticOpenErr, "unable to open emoji file from embedded filesystem")
}
// nolint:gosec // nolint:gosec
diskFile, err := os.Create(emojiPath) diskFile, err := os.Create(emojiPath)