Skip to content

Commit b131558

Browse files
j2rong4cnxrgzs
andcommitted
Update drivers/139/driver.go
Co-authored-by: MadDogOwner <xiaoran@xrgzs.top>
1 parent c888c4c commit b131558

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/139/driver.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,9 @@ func (d *Yun139) Put(ctx context.Context, dstDir model.Obj, stream model.FileStr
787787
if size%partSize > 0 {
788788
part++
789789
}
790+
if part == 0 {
791+
part = 1
792+
}
790793
rateLimited := driver.NewLimitedUploadStream(ctx, stream)
791794
for i := int64(0); i < part; i++ {
792795
if utils.IsCanceled(ctx) {

0 commit comments

Comments
 (0)