cp/mirror: Use proper paths for windows during copyObject. (#1897)
Fixes #1857
This commit is contained in:
committed by
Krishna Srinivas
parent
0a42e2969a
commit
2412aae68f
+2
-1
@@ -183,7 +183,8 @@ func doCopy(cpURLs URLs, progressReader *progressBar, accountingReader *accounte
|
||||
// If source/target are object storage their aliases must be the same.
|
||||
if sourceAlias == targetAlias {
|
||||
// Do not include alias inside path for ObjStore -> ObjStore.
|
||||
err := copySourceStreamFromAlias(targetAlias, targetURL.String(), sourceURL.Path, length, progress)
|
||||
sourcePath := filepath.ToSlash(sourceURL.Path)
|
||||
err := copySourceStreamFromAlias(targetAlias, targetURL.String(), sourcePath, length, progress)
|
||||
if err != nil {
|
||||
cpURLs.Error = err.Trace(sourceURL.String())
|
||||
return cpURLs
|
||||
|
||||
+2
-1
@@ -246,7 +246,8 @@ func (ms *mirrorSession) doMirror(sURLs URLs) URLs {
|
||||
if sourceAlias == targetAlias {
|
||||
// If source/target are object storage their aliases must be the same
|
||||
// Do not include alias inside path for ObjStore -> ObjStore.
|
||||
err := copySourceStreamFromAlias(targetAlias, targetURL.String(), sourceURL.Path, length, ms.status)
|
||||
sourcePath := filepath.ToSlash(sourceURL.Path)
|
||||
err := copySourceStreamFromAlias(targetAlias, targetURL.String(), sourcePath, length, ms.status)
|
||||
if err != nil {
|
||||
return sURLs.WithError(err.Trace(sourceURL.String()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user