UNC paths should have backslashes, not front-slashes.
This commit is contained in:
parent
415837c544
commit
45e14a8dc4
|
@ -148,7 +148,7 @@ module Vagrant
|
||||||
# @param [String] path Path to convert to UNC for Windows
|
# @param [String] path Path to convert to UNC for Windows
|
||||||
# @return [String]
|
# @return [String]
|
||||||
def windows_unc_path(path)
|
def windows_unc_path(path)
|
||||||
"//?/" + path.gsub("/", "\\")
|
"\\\\?\\" + path.gsub("/", "\\")
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns a boolean noting whether the terminal supports color.
|
# Returns a boolean noting whether the terminal supports color.
|
||||||
|
|
|
@ -13,7 +13,7 @@ describe Vagrant::Util::Platform do
|
||||||
|
|
||||||
describe "#windows_unc_path" do
|
describe "#windows_unc_path" do
|
||||||
it "correctly converts a 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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue