diff --git a/drivers/aliyundrive/driver.go b/drivers/aliyundrive/driver.go index f0572792f7e..151eceaf7de 100644 --- a/drivers/aliyundrive/driver.go +++ b/drivers/aliyundrive/driver.go @@ -264,7 +264,9 @@ func (d *AliDrive) Put(ctx context.Context, dstDir model.Obj, stream model.FileS return err } res.Body.Close() - up(i * 100 / count) + if count > 0 { + up(i * 100 / count) + } } var resp2 base.Json _, err, e = d.request("https://api.aliyundrive.com/v2/file/complete", http.MethodPost, func(req *resty.Request) {