mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
Convert errors tracer into a separate package (#5221)
This commit is contained in:
@@ -19,6 +19,8 @@ package cmd
|
||||
import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/minio/minio/pkg/errors"
|
||||
)
|
||||
|
||||
// Tree walk result carries results of tree walking.
|
||||
@@ -141,7 +143,7 @@ func doTreeWalk(bucket, prefixDir, entryPrefixMatch, marker string, recursive bo
|
||||
if err != nil {
|
||||
select {
|
||||
case <-endWalkCh:
|
||||
return traceError(errWalkAbort)
|
||||
return errors.Trace(errWalkAbort)
|
||||
case resultCh <- treeWalkResult{err: err}:
|
||||
return err
|
||||
}
|
||||
@@ -203,7 +205,7 @@ func doTreeWalk(bucket, prefixDir, entryPrefixMatch, marker string, recursive bo
|
||||
isEOF := ((i == len(entries)-1) && isEnd)
|
||||
select {
|
||||
case <-endWalkCh:
|
||||
return traceError(errWalkAbort)
|
||||
return errors.Trace(errWalkAbort)
|
||||
case resultCh <- treeWalkResult{entry: pathJoin(prefixDir, entry), end: isEOF}:
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user