mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-25 17:53:41 +01:00
Remove media attachment only when file was exist (#25586)
This commit is contained in:
parent
bb4756c823
commit
7a25af64dd
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue