UNC paths should have backslashes, not front-slashes.

This commit is contained in:
Jean-Francois Bibeau 2015-04-16 11:02:58 -04:00
parent 415837c544
commit 45e14a8dc4
2 changed files with 2 additions and 2 deletions

View File

@ -148,7 +148,7 @@ module Vagrant
# @param [String] path Path to convert to UNC for Windows
# @return [String]
def windows_unc_path(path)
"//?/" + path.gsub("/", "\\")
"\\\\?\\" + path.gsub("/", "\\")
end
# Returns a boolean noting whether the terminal supports color.

View File

@ -13,7 +13,7 @@ describe Vagrant::Util::Platform do
describe "#windows_unc_path" do
it "correctly converts a path" do
expect(described_class.windows_unc_path("c:/foo").to_s).to eql("//?/c:\\foo")
expect(described_class.windows_unc_path("c:/foo").to_s).to eql("\\\\?\\c:\\foo")
end
end
end