Skip to content

Webdav COPY on new endpoint must trigger copy hooks #29561

Closed

Description

@PVince81

Steps

  1. Create file "test.txt"
  2. Breakpoint in $view->copy()
  3. Use Webdav COPY on new DAV endpoint to copy "test.txt" to a new file "test2.txt"

Expected result

$view->copy() called, copy hooks triggered

Actual result

$view->copy() not called at all.

Version

v10.0.3

It is likely that the COPY operation is not rewired to use $view->copy() like the old DAV endpoint.
The move the new DAV endpoint has discarded these optimizations that were implemented in the tree level.

There are two possibilities:

  1. Bring back the copy handler on tree level (also see Don't query Sabre parent nodes #28853 and maybe wait for this one to merged first)

or

  1. Find a way to trigger the copy hooks instead.

But I heard from @ahmedammar that it might already be firing a DELETE hook ?!

So it is possible that the code path is actually doing a DELETE + stream-copy replacement.

This reminds me of the code that @DeepDiver1975 had to bring in this PR to prevent this behavior for versions: https://github.com/owncloud/core/pull/29257/files#diff-b57f55de99d26900414647f6cd0de354R57.

@DeepDiver1975 will the CopyPlugin also work for regular files ?

Activity

  1. added this to the milestone on Nov 14, 2017
  2. ahmedammar commented on Nov 14, 2017

    @ahmedammar
    Contributor

    Just to clarify, the delete signal is triggered on a DELETE request, but is not triggered on a COPY request (as I would expect). And the post_copy signal is completely missing for a COPY request on new /dav/ route.

  3. modified the milestones: , development on Nov 22, 2017
  4. PVince81 commented on Dec 13, 2017

    @PVince81
    ContributorAuthor

    #28853 is merged. Tried copy, still not triggered.

    So we'll likely need something like the CopyPlugin

  5. modified the milestones: development, on Jan 12, 2018
  6. ownclouders commented on Feb 20, 2018

    @ownclouders
    Contributor

    Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

    (This is an automated comment from GitMate.io.)

  7. 16 remaining items

  8. modified the milestones: backlog, development on Nov 29, 2018
  9. IljaN commented on Dec 4, 2018

    @IljaN
    Contributor

    The simplest solution would be to trigger the copy operation from the view. But as far as I understood from the code we want to reduce the dependency to view.

  10. modified the milestones: development, backlog on Dec 4, 2018
  11. PVince81 commented on Mar 19, 2019

    @PVince81
    ContributorAuthor

    I guess for now it would be fine triggering the same even from inside the DAV layer, as long as all params are the same as the one from the View.

  12. modified the milestones: backlog, development on May 19, 2019
  13. micbar commented on Jun 7, 2019

    @micbar
    Contributor

    @VicDeo any update on this issue?

  14. VicDeo commented on Jun 10, 2019

    @VicDeo
    Contributor

    I poorly understood what we want to achieve here but I hope rewriting a new endpoint into the old endpoint is not what we want.

  15. VicDeo commented on Jun 14, 2019

    @VicDeo
    Contributor
  16. locked as resolved and limited conversation to collaborators on Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions