lib/rake/delphi/tool.rb in rake-delphi-0.0.26 vs lib/rake/delphi/tool.rb in rake-delphi-0.0.27

- old
+ new

@@ -63,11 +63,11 @@ Logger.trace(Logger::DEBUG, "Reading user option '#{name}' in '#{root}'") ::Win32::Registry::HKEY_CURRENT_USER.open(root) do |reg| key_exists = true reg_typ, reg_val = reg.read(name) Logger.trace(Logger::TRACE, "Value: #{reg_val}") - return reg_val.gsub('\\', '/') + return reg_val.dos2unix_separator end rescue ::Win32::Registry::Error => e Logger.trace(Logger::DEBUG, "No reg key '%s'?! %s" % \ [(key_exists ? "#{root}\\#{name}" : root), e.message]) return '' @@ -114,10 +114,10 @@ ::Win32::Registry::HKEY_CURRENT_USER].each do |regRoot| begin Logger.trace(Logger::DEBUG, "Finding Delphi dir for #{ver}") regRoot.open(rootForVersion(ver)) do |reg| reg_typ, reg_val = reg.read('RootDir') - return reg_val.gsub('\\', '/') + return reg_val.unix2dos_separator end rescue ::Win32::Registry::Error Logger.trace(Logger::DEBUG, "No reg key '#{regRoot}'?!") end end