Skip to content

Commit bdefdc0

Browse files
authored
cp: Fix Windows paths (#3250)
Paths without `/` separator were not trimmed correctly. Fixes #3241 Regression originating from #3115
1 parent c51e3b3 commit bdefdc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/cp-url.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ func makeCopyContentTypeC(sourceAlias string, sourceURL ClientURL, sourceContent
201201
return URLs{Error: probe.NewError(err)}
202202
}
203203
if fileInfo.IsDir() {
204-
sourcePrefix = sourceURL.Path
204+
sourcePrefix = filepath.ToSlash(sourceURL.Path)
205205
}
206206
}
207207
newSourceSuffix = strings.TrimPrefix(newSourceSuffix, sourcePrefix)

0 commit comments

Comments
 (0)