mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-12 14:16:12 +01:00
Fix BackupService crashing when an attachment is missing (#11241)
* Fix BackupService crashing when an attachment is missing For various reasons such as admin error or out-of-sync media and database backups, it might be possible for local attachments to be lost. This commit allows the BackupService to continue its work even if some media file is missing. * Change error message
This commit is contained in:
parent
b073008282
commit
bd77fd6ff3
@ -164,5 +164,7 @@ class BackupService < BaseService
|
|||||||
io.write(buffer)
|
io.write(buffer)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
rescue Errno::ENOENT
|
||||||
|
Rails.logger.warn "Could not backup file #{filename}: file not found"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user