From e9fe8f60638f57be9173b545364b1acf3b4d23e3 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 7 Mar 2014 19:22:40 +1100 Subject: [PATCH] Revert "BUGFIX: if uploads is in a symlinked directory stuff breaks" This reverts commit 894bb0716c0ae3a8bf0e4731096111c8610143e8. The issue here was that docker was not mounting stuff properly post reboot, then we had a broken symlink that "exists" --- app/models/site_customization.rb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/app/models/site_customization.rb b/app/models/site_customization.rb index 6c8aef0619f..f46ea5e592a 100644 --- a/app/models/site_customization.rb +++ b/app/models/site_customization.rb @@ -153,14 +153,7 @@ class SiteCustomization < ActiveRecord::Base [[:desktop, 'stylesheet_baked'], [:mobile, 'mobile_stylesheet_baked']].each do |target, baked_attr| path = stylesheet_fullpath(target) dir = cache_fullpath - - begin - FileUtils.mkdir_p(dir) - rescue - # subtle issue, this happens if "uploads" is a symlink - Errno::EEXIST - end - + FileUtils.mkdir_p(dir) unless File.exists?(path) File.open(path, "w") do |f| f.puts self.send(baked_attr)