Skip to content

Commit

Permalink
feat(139): implement MoveResult interface (close #5130)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Sep 13, 2023
1 parent 352a6a7 commit b1a279c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/139/driver.go
Expand Up @@ -103,9 +103,9 @@ func (d *Yun139) MakeDir(ctx context.Context, parentDir model.Obj, dirName strin
return err
}

func (d *Yun139) Move(ctx context.Context, srcObj, dstDir model.Obj) error {
func (d *Yun139) Move(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error) {
if d.isFamily() {
return errs.NotImplement
return nil, errs.NotImplement
}
var contentInfoList []string
var catalogInfoList []string
Expand All @@ -131,7 +131,10 @@ func (d *Yun139) Move(ctx context.Context, srcObj, dstDir model.Obj) error {
}
pathname := "/orchestration/personalCloud/batchOprTask/v1.0/createBatchOprTask"
_, err := d.post(pathname, data, nil)
return err
if err != nil {
return nil, err
}
return srcObj, nil
}

func (d *Yun139) Rename(ctx context.Context, srcObj model.Obj, newName string) error {
Expand Down

0 comments on commit b1a279c

Please sign in to comment.