From 4783b6508e69d34d65dc32db30e85842ba0d4985 Mon Sep 17 00:00:00 2001 From: Ali Rizvi-Santiago Date: Thu, 23 Mar 2017 15:12:25 -0500 Subject: [PATCH] Fix common/download_test.go to avoid formatting the volume name to a hidden windows share when not on windows. --- common/download_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/download_test.go b/common/download_test.go index 81cc3244f..114ca8ec3 100644 --- a/common/download_test.go +++ b/common/download_test.go @@ -452,7 +452,10 @@ func TestFileUriTransforms(t *testing.T) { cwd = filepath.ToSlash(cwd) volume = filepath.VolumeName(cwd) share = volume - if share[len(share)-1] == ':' { + + // if a volume was found (on windows), replace the ':' from + // C: to C$ to convert it into a hidden windows share. + if len(share) > 1 && share[len(share)-1] == ':' { share = share[:len(share)-1] + "$" } cwd = cwd[len(volume):]