From bdefdc0169b5ed55ebd348784a6f37cc2b535f93 Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Wed, 10 Jun 2020 09:31:59 -0700 Subject: [PATCH] cp: Fix Windows paths (#3250) Paths without `/` separator were not trimmed correctly. Fixes #3241 Regression originating from #3115 --- cmd/cp-url.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/cp-url.go b/cmd/cp-url.go index 6b23e3f7..57a5cc17 100644 --- a/cmd/cp-url.go +++ b/cmd/cp-url.go @@ -201,7 +201,7 @@ func makeCopyContentTypeC(sourceAlias string, sourceURL ClientURL, sourceContent return URLs{Error: probe.NewError(err)} } if fileInfo.IsDir() { - sourcePrefix = sourceURL.Path + sourcePrefix = filepath.ToSlash(sourceURL.Path) } } newSourceSuffix = strings.TrimPrefix(newSourceSuffix, sourcePrefix)