Skip to content

Commit

Permalink
fix an error when move using destination id
Browse files Browse the repository at this point in the history
  • Loading branch information
2403905 committed Feb 6, 2024
1 parent bf89f7a commit 37109d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions changelog/unreleased/fix-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Fix an error when move

We fixed a bug that caused Internal Server Error when move using destination id

https://github.com/cs3org/reva/pull/4503
https://github.com/owncloud/ocis/issues/6739
6 changes: 5 additions & 1 deletion internal/http/services/owncloud/ocdav/move.go
Original file line number Diff line number Diff line change
Expand Up @@ -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().ParentId
}
mReq := &provider.MoveRequest{Source: src, Destination: dst}
mRes, err := client.Move(ctx, mReq)
if err != nil {
Expand Down

0 comments on commit 37109d1

Please sign in to comment.