From 0806fcc7d477b45d158e8a152b1f927f395d3aa7 Mon Sep 17 00:00:00 2001 From: Robin Houston Date: Sun, 3 Jun 2012 14:28:43 +0100 Subject: File.dirname(__FILE__) is not necessarily absolute MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- script/handle-mail-replies.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'script/handle-mail-replies.rb') diff --git a/script/handle-mail-replies.rb b/script/handle-mail-replies.rb index 7590f5848..cc15fe35a 100755 --- a/script/handle-mail-replies.rb +++ b/script/handle-mail-replies.rb @@ -12,7 +12,7 @@ # We want to avoid loading rails unless we need it, so we start by just loading the # config file ourselves. -$alaveteli_dir = File.join(File.dirname(__FILE__), '..') +$alaveteli_dir = File.expand_path(File.join(File.dirname(__FILE__), '..')) $:.push(File.join($alaveteli_dir, "commonlib", "rblib")) load "config.rb" MySociety::Config.set_file(File.join($alaveteli_dir, 'config', 'general'), true) -- cgit v1.2.3