Skip to content

Commit

Permalink
LOGSTASH-1066 - fix debug puts statement and whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
James Scott committed Aug 13, 2013
1 parent 2fa82de commit c21025c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/logstash/JRUBY-6970.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,22 @@ def expand_path(path, dir=nil)
return File.join("#{jar}!", path)
end
dir = expand_path_JRUBY_6970(path, dir)
return fix_jar_path(jar, dir)
return fix_jar_path(jar, dir)
else
return expand_path_JRUBY_6970(path, dir)
end
end
end

protected

def self.fix_jar_path(jar, resource)
# TODO(sissel): use LogStash::Util::UNAME
if RbConfig::CONFIG["host_os"] == "mswin32"
# 'expand_path' on "/" will return "C:/" on windows.
# So like.. we don't want that because technically this
# is the root of the jar, not of a disk.
puts :expand_path => [path, "#{jar}!#{resource.gsub(/^[A-Za-z]:/, "")}"]
puts :fix_jar_path => ["#{jar}!#{resource.gsub(/^[A-Za-z]:/, "")}"]
return "#{jar}!#{resource.gsub(/^[A-Za-z]:/, "")}"
else
return "#{jar}!#{resource}"
Expand Down

0 comments on commit c21025c

Please sign in to comment.