diff options
author | ThibG <thib@sitedethib.com> | 2019-07-08 02:24:25 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-07-15 00:48:49 +0200 |
commit | bd77fd6ff3cf17a512d26547f78af1e804bd432d (patch) | |
tree | d874efb806d7b59e8c2fea588aab60e0f1388285 /app | |
parent | b07300828249d4199e2d5fa72fe5808d2387f1c0 (diff) |
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
Diffstat (limited to 'app')
-rw-r--r-- | app/services/backup_service.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/backup_service.rb b/app/services/backup_service.rb index bd9e77223..cc9fb1f4e 100644 --- a/app/services/backup_service.rb +++ b/app/services/backup_service.rb @@ -164,5 +164,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 |