Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions command/cp.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,13 +488,6 @@ func (c Copy) Run(ctx context.Context) error {
continue
}

if !object.Type.IsRegular() {
err := fmt.Errorf("object '%v' is not a regular file", object)
merrorObjects = multierror.Append(merrorObjects, err)
printError(c.fullCommand, c.op, err)
continue
}

if err := object.Err; err != nil {
merrorObjects = multierror.Append(merrorObjects, err)
printError(c.fullCommand, c.op, err)
Expand All @@ -518,6 +511,13 @@ func (c Copy) Run(ctx context.Context) error {
continue
}

if !object.Type.IsRegular() {
err := fmt.Errorf("object '%v' is not a regular file", object)
merrorObjects = multierror.Append(merrorObjects, err)
printError(c.fullCommand, c.op, err)
continue
}

srcurl := object.URL
var task parallel.Task

Expand Down Expand Up @@ -747,7 +747,6 @@ func (c Copy) doUpload(ctx context.Context, srcurl *url.URL, dsturl *url.URL, ex

reader := newCountingReaderWriter(file, c.progressbar)
err = dstClient.Put(ctx, reader, dsturl, metadata, c.concurrency, c.partSize)

if err != nil {
return err
}
Expand Down
Loading