fix an error when move using destination id

This commit is contained in:
Roman Perekhod
2024-02-08 12:01:55 +01:00
parent b058934d4c
commit 94e86eb8de
5 changed files with 16 additions and 5 deletions

View File

@@ -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 {