From 5cff19c9f2c70a1071732a02c4ffd5d383901565 Mon Sep 17 00:00:00 2001 From: Dhanashree Phulkar Date: Thu, 19 Sep 2024 16:17:30 +0530 Subject: [PATCH] azcopy url-decodes slashes from directory names for windows --- cmd/copyEnumeratorInit.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/copyEnumeratorInit.go b/cmd/copyEnumeratorInit.go index 4e05212e1..0298d8fcc 100755 --- a/cmd/copyEnumeratorInit.go +++ b/cmd/copyEnumeratorInit.go @@ -559,9 +559,8 @@ func pathEncodeRules(path string, fromTo common.FromTo, disableAutoDecoding bool } } - // If uploading from Windows or downloading from files, decode unsafe chars if user enables decoding - } else if ((!source && fromTo.From() == common.ELocation.Local() && runtime.GOOS == "windows") || (!source && fromTo.From() == common.ELocation.File())) && !disableAutoDecoding { - + // If downloading from files, decode unsafe chars if user enables decoding + } else if (!source && fromTo.From() == common.ELocation.File()) && !disableAutoDecoding { for encoded, c := range reverseEncodedChars { for k, p := range pathParts { pathParts[k] = strings.ReplaceAll(p, encoded, string(c))