core: do not convert drive letters to UNC paths [GH-6598]

This commit is contained in:
Mitchell Hashimoto 2015-12-24 12:36:14 -08:00
parent 39543973f1
commit cf4b03d701
2 changed files with 10 additions and 2 deletions

View File

@ -4,6 +4,8 @@ BUG FIXES:
- core: Don't create ".bundle" directory in pwd [GH-6717]
- core: Fix exception on installing VirtualBox [GH-6713]
- core: Do not convert standalone drive letters such as "D:" to
UNC paths [GH-6598]
- commands/up: Smarter logic about what provider to install, avoiding
situations where VirtualBox was installed over the correct provider [GH-6731]
- guests/debian: Fix Docker install [GH-6722]

View File

@ -185,6 +185,12 @@ module Vagrant
# @param [String] path Path to convert to UNC for Windows
# @return [String]
def windows_unc_path(path)
path = path.gsub("/", "\\")
# If the path is just a drive letter, then return that as-is
return path if path =~ /^[a-zA-Z]:\\?$/
# Convert to UNC path
"\\\\?\\" + path.gsub("/", "\\")
end