core: do not convert drive letters to UNC paths [GH-6598]
This commit is contained in:
parent
39543973f1
commit
cf4b03d701
|
@ -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]
|
||||
|
|
|
@ -65,7 +65,7 @@ module Vagrant
|
|||
# "Hyper-V Administrators" group.
|
||||
#
|
||||
# From: https://support.microsoft.com/en-us/kb/243330
|
||||
# SID: S-1-5-32-578
|
||||
# SID: S-1-5-32-578
|
||||
# Name: BUILTIN\Hyper-V Administrators
|
||||
#
|
||||
# @return [Boolean]
|
||||
|
@ -73,7 +73,7 @@ module Vagrant
|
|||
begin
|
||||
username = ENV["USERNAME"]
|
||||
process = Subprocess.execute("net", "localgroup", "Hyper-V Administrators")
|
||||
output = process.stdout.chomp
|
||||
output = process.stdout.chomp
|
||||
return output.include?(username)
|
||||
rescue Errors::CommandUnavailableWindows
|
||||
return false
|
||||
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue