You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stray share entries in DB after deleting parent folder #14664
@jnfrmarks another test case. Can probably be verified by checking that the created link share does not exist any more after deleting the parent folder. (currently if you query it with the OCS Share API you'll see that it still exist)
Maybe that code needs to be extended to also do the same for all children.
That's the place where I miss something like "SELECT fileid FROM children" ...
I guess a 8.1 scoped solution would be to trigger a background job to delete all orphaned shares (not only the currently deleted one).
The query itself can be expensive in case of many orphaned entries with SQLite since we cannot use DELETE + LEFT JOIN (like MySQL allows), so better put it in a background job.
Activity
PVince81 commentedon Mar 3, 2015
Workaround would be to run this #12323 after a deletion (or on a regular basis).
But the other bug is that the link share doesn't give 404 directly.
wshadow commentedon Mar 3, 2015
Another case for Foreign keys? #13143
PVince81 commentedon Mar 3, 2015
Yeah...
CC @DeepDiver1975
PVince81 commentedon Mar 3, 2015
Setting to 8.1 to keep this in mind...
PVince81 commentedon Mar 3, 2015
@jnfrmarks another test case. Can probably be verified by checking that the created link share does not exist any more after deleting the parent folder. (currently if you query it with the OCS Share API you'll see that it still exist)
PVince81 commentedon Mar 3, 2015
It looks like shares set directly on the deleted item (file/folder) is deleted here: https://github.com/owncloud/core/blob/master/apps/files_sharing/lib/updater.php#L89
Maybe that code needs to be extended to also do the same for all children.
That's the place where I miss something like "SELECT fileid FROM children" ...
PVince81 commentedon Mar 3, 2015
I guess a 8.1 scoped solution would be to trigger a background job to delete all orphaned shares (not only the currently deleted one).
The query itself can be expensive in case of many orphaned entries with SQLite since we cannot use DELETE + LEFT JOIN (like MySQL allows), so better put it in a background job.
PVince81 commentedon Mar 23, 2015
Duplicate of #6985