• Steven's avatar
    fix(store): allow memo/attachment deletion when local file is missing · 704503e5
    Steven authored
    Fixes two bugs reported in #5603:
    
    1. store/attachment.go: ignore os.ErrNotExist when removing a local
       attachment file so that a missing file on disk (broken state from
       failed uploads) no longer blocks deletion of the DB record, allowing
       memos referencing corrupt attachments to be deleted normally.
    
    2. memo_attachment_service.go: add nil guard on GetAttachment result
       before dereferencing it in SetMemoAttachments, preventing a nil
       pointer panic when an attachment UID no longer exists in the DB.
    704503e5
Name
Last commit
Last update
.github Loading commit data...
cmd/memos Loading commit data...
internal Loading commit data...
plugin Loading commit data...
proto Loading commit data...
scripts Loading commit data...
server Loading commit data...
store Loading commit data...
web Loading commit data...
.dockerignore Loading commit data...
.gitignore Loading commit data...
.golangci.yaml Loading commit data...
AGENTS.md Loading commit data...
CODEOWNERS Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
SECURITY.md Loading commit data...
go.mod Loading commit data...
go.sum Loading commit data...