From d5fd1bf169685ea551fff8016767a4b2abfb94ed Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Fri, 16 Dec 2022 20:28:08 -0800 Subject: [PATCH] Fix error handling for #1916 --- core/data/emoji.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/data/emoji.go b/core/data/emoji.go index b2cbbaba4..e5690d419 100644 --- a/core/data/emoji.go +++ b/core/data/emoji.go @@ -92,7 +92,10 @@ func SetupEmojiDirectory() (err error) { 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 diskFile, err := os.Create(emojiPath)