1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
Description: Fix relative path issue
Tweak the file open statement to point to /usr/share/ location. The gem
requires these xml files to run and hence they are copied to
/usr/share/ruby-browser location.
Author: Balasankar C <balasankarc@autistici.org>
Forwarded: not-needed
Last-Update: 2015-05-28
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: ruby-browser/lib/browser.rb
===================================================================
--- ruby-browser.orig/lib/browser.rb
+++ ruby-browser/lib/browser.rb
@@ -78,7 +78,11 @@ module Browser
EMPTY_STRING = "".freeze
def self.root
- @root ||= Pathname.new(File.expand_path("../..", __FILE__))
+ if Pathname.new(File.expand_path('/usr/share/ruby-browser')).exist?
+ @root = Pathname.new(File.expand_path('/usr/share/ruby-browser'))
+ else
+ @root ||= Pathname.new(File.expand_path("../..", __FILE__))
+ end
end
# Hold the list of browser matchers.
|