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
5 changes: 5 additions & 0 deletions command/cp.go
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,11 @@ func (c Copy) shouldOverride(ctx context.Context, srcurl *url.URL, dsturl *url.U
return err
}

// if source not exists, cannot proceed with comparison
if srcObj == nil {
return fmt.Errorf("stat on source object returned nil")
}

dstClient, err := storage.NewClient(ctx, dsturl, c.storageOpts)
if err != nil {
return err
Expand Down
Loading