fix an error when move using destination id
This commit is contained in:
+5
-1
@@ -266,7 +266,11 @@ func (s *svc) handleMove(ctx context.Context, w http.ResponseWriter, r *http.Req
|
||||
}
|
||||
// TODO what if intermediate is a file?
|
||||
}
|
||||
|
||||
// resolve the destination path
|
||||
if dst.Path == "." {
|
||||
dst.Path = utils.MakeRelativePath(dstStatRes.GetInfo().GetName())
|
||||
dst.ResourceId = dstStatRes.GetInfo().GetParentId()
|
||||
}
|
||||
mReq := &provider.MoveRequest{Source: src, Destination: dst}
|
||||
mRes, err := client.Move(ctx, mReq)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user