From 5275598d35d424e97ab9fbf98537f1346122f439 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Tue, 10 Oct 2017 03:30:26 +0000 Subject: [PATCH] not necessary to use disk letter in azure file mount --- pkg/util/mount/mount_windows.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg/util/mount/mount_windows.go b/pkg/util/mount/mount_windows.go index 50c95caa528..6376abcdc4f 100644 --- a/pkg/util/mount/mount_windows.go +++ b/pkg/util/mount/mount_windows.go @@ -84,12 +84,8 @@ func (mounter *Mounter) Mount(source string, target string, fstype string, optio `$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord`, options[0], options[1]) - driverLetter, err := getAvailableDriveLetter() - if err != nil { - return err - } - bindSource = driverLetter + ":" - cmdLine += fmt.Sprintf(";New-SmbGlobalMapping -LocalPath %s -RemotePath %s -Credential $Credential", bindSource, source) + bindSource = source + cmdLine += fmt.Sprintf(";New-SmbGlobalMapping -RemotePath %s -Credential $Credential", source) if output, err := exec.Command("powershell", "/c", cmdLine).CombinedOutput(); err != nil { // we don't return error here, even though New-SmbGlobalMapping failed, we still make it successful,