summaryrefslogtreecommitdiff
path: root/internal/media/processingemoji.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-09-19 13:59:11 +0200
committerLibravatar GitHub <noreply@github.com>2022-09-19 12:59:11 +0100
commitde26924a4a47fa6b48971cf51f51a5b732745e59 (patch)
treeac667f5a5089bbe832bba78fb0cf019075863d4c /internal/media/processingemoji.go
parent[bugfix] Server and closer bugfixes (#839) (diff)
downloadgotosocial-de26924a4a47fa6b48971cf51f51a5b732745e59.tar.xz
don't error out if storage key already exists (#840)
Diffstat (limited to 'internal/media/processingemoji.go')
-rw-r--r--internal/media/processingemoji.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/media/processingemoji.go b/internal/media/processingemoji.go
index e3ed5ce0a..7ffb6d7fa 100644
--- a/internal/media/processingemoji.go
+++ b/internal/media/processingemoji.go
@@ -136,7 +136,7 @@ func (p *ProcessingEmoji) loadStatic(ctx context.Context) error {
}
// put the static in storage
- if err := p.storage.Put(ctx, p.emoji.ImageStaticPath, static.small); err != nil {
+ if err := p.storage.Put(ctx, p.emoji.ImageStaticPath, static.small); err != nil && err != storage.ErrAlreadyExists {
p.err = fmt.Errorf("loadStatic: error storing static: %s", err)
atomic.StoreInt32(&p.staticState, int32(errored))
return p.err
@@ -217,7 +217,7 @@ func (p *ProcessingEmoji) store(ctx context.Context) error {
multiReader := io.MultiReader(bytes.NewBuffer(firstBytes), reader)
// store this for now -- other processes can pull it out of storage as they please
- if err := p.storage.PutStream(ctx, p.emoji.ImagePath, multiReader); err != nil {
+ if err := p.storage.PutStream(ctx, p.emoji.ImagePath, multiReader); err != nil && err != storage.ErrAlreadyExists {
return fmt.Errorf("store: error storing stream: %s", err)
}