From bc9fd2c46d1ffb715967bce8b11525cc8e7ad28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Fri, 12 Jun 2015 20:11:23 +0200 Subject: [PATCH] don't silence these errors --- app/models/optimized_image.rb | 2 -- app/models/upload.rb | 2 -- 2 files changed, 4 deletions(-) diff --git a/app/models/optimized_image.rb b/app/models/optimized_image.rb index aca56736743..2d8098f1c78 100644 --- a/app/models/optimized_image.rb +++ b/app/models/optimized_image.rb @@ -195,11 +195,9 @@ class OptimizedImage < ActiveRecord::Base if external url = SiteSetting.scheme + ":" + previous_url file = FileHelper.download(url, max_file_size_kb, "discourse", true) rescue nil - next unless file path = file.path else path = local_store.path_for(optimized_image) - next unless File.exists?(path) file = File.open(path) end # compute SHA if missing diff --git a/app/models/upload.rb b/app/models/upload.rb index 3b0d0486882..bda663f1925 100644 --- a/app/models/upload.rb +++ b/app/models/upload.rb @@ -167,11 +167,9 @@ class Upload < ActiveRecord::Base if external url = SiteSetting.scheme + ":" + previous_url file = FileHelper.download(url, max_file_size_kb, "discourse", true) rescue nil - next unless file path = file.path else path = local_store.path_for(upload) - next unless File.exists?(path) end # compute SHA if missing if upload.sha1.blank?