cp: Fix Windows paths (#3250)
Paths without `/` separator were not trimmed correctly. Fixes #3241 Regression originating from #3115
This commit is contained in:
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user