Encode directory names to filesystem encoding for proper comparison

Dir.entries have filesystem encoding (ANSI in Windows).
Path fragments have terminal encoding (DOS).
This commit is contained in:
Ilya Vassilevsky 2014-07-08 19:01:43 +04:00
parent 764be49b55
commit ad54e14d65
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ module Vagrant
# Traverse each part and join it into the resulting path
original.each do |single|
Dir.entries(path).each do |entry|
if entry.downcase == single.downcase
if entry.downcase == single.encode('filesystem').downcase
path = path.join(entry)
end
end