Fix common/download_test.go to avoid formatting the volume name to a hidden windows share when not on windows.
This commit is contained in:
parent
d275bacb0f
commit
4783b6508e
|
@ -452,7 +452,10 @@ func TestFileUriTransforms(t *testing.T) {
|
||||||
cwd = filepath.ToSlash(cwd)
|
cwd = filepath.ToSlash(cwd)
|
||||||
volume = filepath.VolumeName(cwd)
|
volume = filepath.VolumeName(cwd)
|
||||||
share = volume
|
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] + "$"
|
share = share[:len(share)-1] + "$"
|
||||||
}
|
}
|
||||||
cwd = cwd[len(volume):]
|
cwd = cwd[len(volume):]
|
||||||
|
|
Loading…
Reference in New Issue