summaryrefslogtreecommitdiff
path: root/lib/ohai/system.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ohai/system.rb')
-rw-r--r--lib/ohai/system.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ohai/system.rb b/lib/ohai/system.rb
index 6526f3f4..8721be32 100644
--- a/lib/ohai/system.rb
+++ b/lib/ohai/system.rb
@@ -133,7 +133,7 @@ module Ohai
Dir[File.join(path, '*')],
Dir[File.join(path, @data[:os], '**', '*')]
].flatten.each do |file|
- file_regex = Regexp.new("#{path}#{File::SEPARATOR}(.+).rb$")
+ file_regex = Regexp.new("#{File.expand_path(path)}#{File::SEPARATOR}(.+).rb$")
md = file_regex.match(file)
if md
plugin_name = md[1].gsub(File::SEPARATOR, "::")