aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-06-03 14:28:43 +0100
committerRobin Houston <robin.houston@gmail.com>2012-06-03 14:28:43 +0100
commit0806fcc7d477b45d158e8a152b1f927f395d3aa7 (patch)
tree3fc0d5028a42c3a9f7971a349d67d90ab071a223 /app/controllers/application_controller.rb
parent775e122cb4824c9734f50db0dd2967779636080e (diff)
File.dirname(__FILE__) is not necessarily absolute
It’s weird that there’s so much code here that implicitly assumes File.dirname(__FILE__) is an absolute path, because really in general it very much is not! This assumption was invalidated by the recent bundler-awareness changes.
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index e305e90f4..82884f6c3 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -202,7 +202,7 @@ class ApplicationController < ActionController::Base
# return stub path so admin can expire it
first_three_digits = info_request.id.to_s()[0..2]
path = "views/request/#{first_three_digits}/#{info_request.id}"
- foi_cache_path = File.join(File.dirname(__FILE__), '../../cache')
+ foi_cache_path = File.expand_path(File.join(File.dirname(__FILE__), '../../cache'))
return File.join(foi_cache_path, path)
end
def foi_fragment_cache_exists?(key_path)