mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
correct bad logic
This commit is contained in:
parent
a0e38a52ed
commit
db7c878f3d
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue