From db7c878f3d4215ea236c6dc2631fa3336af8dad8 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 16 Dec 2015 13:40:34 +1100 Subject: [PATCH] correct bad logic --- app/controllers/user_avatars_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/user_avatars_controller.rb b/app/controllers/user_avatars_controller.rb index f8d9232fb5f..5714e119f24 100644 --- a/app/controllers/user_avatars_controller.rb +++ b/app/controllers/user_avatars_controller.rb @@ -123,9 +123,8 @@ class UserAvatarsController < ApplicationController filename = "#{sha}#{File.extname(url)}" path = "#{PROXY_PATH}/#{filename}" - if File.exist? path + unless File.exist? path FileUtils.mkdir_p PROXY_PATH - else tmp = FileHelper.download(url, 1.megabyte, filename, true) FileUtils.mv tmp.path, path end