From 45e14a8dc45cb56b8f50acffb3a6490aa953aec1 Mon Sep 17 00:00:00 2001 From: Jean-Francois Bibeau Date: Thu, 16 Apr 2015 11:02:58 -0400 Subject: [PATCH] UNC paths should have backslashes, not front-slashes. --- lib/vagrant/util/platform.rb | 2 +- test/unit/vagrant/util/platform_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/util/platform.rb b/lib/vagrant/util/platform.rb index fc6c4d5e0..706445c3b 100644 --- a/lib/vagrant/util/platform.rb +++ b/lib/vagrant/util/platform.rb @@ -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. diff --git a/test/unit/vagrant/util/platform_test.rb b/test/unit/vagrant/util/platform_test.rb index ac0960afc..ae51076ec 100644 --- a/test/unit/vagrant/util/platform_test.rb +++ b/test/unit/vagrant/util/platform_test.rb @@ -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