Skip to content

Commit 3f023ba

Browse files
committed
fix outpt exist code
1 parent ae4074d commit 3f023ba

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

lib/cp.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2415,9 +2415,6 @@ func (cc *CopyCommand) downloadFiles(srcURL CloudURL, destURL FileURL) error {
24152415
func (cc *CopyCommand) formatResultPrompt(err error) error {
24162416
cc.closeProgress()
24172417
fmt.Printf(cc.monitor.progressBar(true, normalExit))
2418-
if err != nil && cc.cpOption.ctnu {
2419-
return nil
2420-
}
24212418
return err
24222419
}
24232420

@@ -2895,9 +2892,7 @@ func (cc *CopyCommand) waitRoutinueComplete(chError, chListError <-chan error, o
28952892
} else {
28962893
ferr = err
28972894
if !cc.cpOption.ctnu {
2898-
cc.closeProgress()
2899-
fmt.Printf(cc.monitor.progressBar(true, errExit))
2900-
return err
2895+
return cc.formatResultPrompt(ferr)
29012896
}
29022897
}
29032898
}

lib/cp_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4665,7 +4665,7 @@ func (s *OssutilCommandSuite) TestDownLoadWithoutDisableIgnoreError(c *C) {
46654665

46664666
// download
46674667
_, err = cm.RunCommand("cp", cpArgs, options)
4668-
c.Assert(err, IsNil)
4668+
c.Assert(err, NotNil)
46694669

46704670
// check,success download 2 file
46714671
// exist

0 commit comments

Comments
 (0)