• 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
..
cache Loading commit data...
db Loading commit data...
migration Loading commit data...
seed Loading commit data...
test Loading commit data...
activity.go Loading commit data...
attachment.go Loading commit data...
cache.go Loading commit data...
common.go Loading commit data...
driver.go Loading commit data...
idp.go Loading commit data...
inbox.go Loading commit data...
instance_setting.go Loading commit data...
memo.go Loading commit data...
memo_relation.go Loading commit data...
migrator.go Loading commit data...
reaction.go Loading commit data...
store.go Loading commit data...
user.go Loading commit data...
user_setting.go Loading commit data...