Skip to content

Commit 6ed7db1

Browse files
authored
fix(drivers/189pc): pass pointer to RenameResp in Rename method (#2647)
Rename function passed RenameResp by value instead of pointer, causing the API response to be discarded and producing a zero-value file entry with empty name, zero size, and zero timestamps after rename.
1 parent 5a12c8d commit 6ed7db1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/189pc/driver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ func (y *Cloud189PC) Rename(ctx context.Context, srcObj model.Obj, newName strin
291291
var resp RenameResp
292292
_, err := y.request(fullUrl, method, func(req *resty.Request) {
293293
req.SetContext(ctx).SetQueryParams(queryParam)
294-
}, nil, resp, isFamily)
294+
}, nil, &resp, isFamily)
295295
if err != nil {
296296
if code, ok := resp.ResCode.(string); ok && code == "FileAlreadyExists" {
297297
return nil, errs.ObjectAlreadyExists

0 commit comments

Comments
 (0)