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
|
||||
# @return [String]
|
||||
def windows_unc_path(path)
|
||||
"//?/" + path.gsub("/", "\\")
|
||||
"\\\\?\\" + path.gsub("/", "\\")
|
||||
end
|
||||
|
||||
# Returns a boolean noting whether the terminal supports color.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue