diff --git a/cmd-copy.go b/cmd-copy.go index 99f8a39b..78b63755 100644 --- a/cmd-copy.go +++ b/cmd-copy.go @@ -110,7 +110,7 @@ func runCopyCmd(ctx *cli.Context) { } }(sourceURLs, targetURL) - var cpQueue = make(chan bool, runtime.NumCPU()-1) + var cpQueue = make(chan bool, intMax(runtime.NumCPU()-1, 1)) var wg sync.WaitGroup for cpURLs := range prepareCopyURLs(sourceURLs, targetURL) {