~cytrogen/masto-fe

7a25af64ddcfac1f4ad3fda2b6f72b03152b202e — S.H 2 years ago bb4756c
Remove media attachment only when file was exist (#25586)

1 files changed, 1 insertions(+), 1 deletions(-)

M app/lib/attachment_batch.rb
M app/lib/attachment_batch.rb => app/lib/attachment_batch.rb +1 -1
@@ 64,7 64,7 @@ class AttachmentBatch
            keys << attachment.style_name_as_path(style)
          when :filesystem
            logger.debug { "Deleting #{attachment.path(style)}" }
            FileUtils.remove_file(attachment.path(style))
            FileUtils.remove_file(attachment.path(style), true)
          when :fog
            logger.debug { "Deleting #{attachment.path(style)}" }
            attachment.directory.files.new(key: attachment.path(style)).destroy