Transfer ownership don't fail on shares pointing to trashed files #26525

Closed
PVince81 opened this Issue Nov 2, 2016 · 1 comment

Projects

None yet

1 participant

@PVince81
Collaborator
PVince81 commented Nov 2, 2016

Steps

  1. Create three users "user1", "user2", "user3"
  2. Login as "user1"
  3. Create a folder "delete/this"
  4. Share "this" with "user3"
  5. Delete folder "delete"
  6. Transfer ownership of "user1" to "user2"

Expected result

Files transferred, trashbin and trashbin shares ignored (or deleted?).

Actual result

± % sudo -uwwwrun ./occ files:transfer-ownership user1 user2
vincent's password:
Analysing files of user1 ...
    0 [>---------------------------]
Collecting all share information for files and folder of user1 ...
    1 [============================]
Transferring files to user2/files/transferred from user1 on 2016-11-02T14:06:42+00:00 ...
Restoring shares ...

                                 
  [OCP\Files\NotFoundException]  

This is also likely to happen for any orphaned share pointing to invalid files.
In these cases, best is to catch the "NotFoundException" and ignore.

Versions

Observed on OC 9.0.5

@DeepDiver1975 @owncloud/qa

@PVince81 PVince81 added this to the 9.1.3 milestone Nov 2, 2016
@PVince81
Collaborator
PVince81 commented Nov 2, 2016

Fix is here: #26527

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment