8
0

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:
ThibG 2019-07-08 02:24:25 +02:00 提交者 Eugen Rochko
父節點 aef567cb9d
當前提交 5a06f68f0e

查看文件

@ -142,5 +142,7 @@ class BackupService < BaseService
io.write(buffer)
end
end
rescue Errno::ENOENT
Rails.logger.warn "Could not backup file #{filename}: file not found"
end
end