Revert "BUGFIX: if uploads is in a symlinked directory stuff breaks"

This reverts commit 894bb0716c.

The issue here was that docker was not mounting stuff properly post
reboot, then we had a broken symlink that "exists"
This commit is contained in:
Sam 2014-03-07 19:22:40 +11:00
parent 894bb0716c
commit e9fe8f6063
1 changed files with 1 additions and 8 deletions

View File

@ -153,14 +153,7 @@ class SiteCustomization < ActiveRecord::Base
[[:desktop, 'stylesheet_baked'], [:mobile, 'mobile_stylesheet_baked']].each do |target, baked_attr| [[:desktop, 'stylesheet_baked'], [:mobile, 'mobile_stylesheet_baked']].each do |target, baked_attr|
path = stylesheet_fullpath(target) path = stylesheet_fullpath(target)
dir = cache_fullpath dir = cache_fullpath
FileUtils.mkdir_p(dir)
begin
FileUtils.mkdir_p(dir)
rescue
# subtle issue, this happens if "uploads" is a symlink
Errno::EEXIST
end
unless File.exists?(path) unless File.exists?(path)
File.open(path, "w") do |f| File.open(path, "w") do |f|
f.puts self.send(baked_attr) f.puts self.send(baked_attr)