nextcloud / nextcloud/groupfolders
Trash backend doesn't emit notifications when deleting/restoring items
Open
Nobody has claimed this yet.
1. to develop
bug
feature: trashbin
good first issue
- Dominant language
- PHP
- Stars
- 343
- Forks
- 106
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 34
Description
files_trashbin emits several events when a file is removed or restored from the trashbin. These are not emitted by the lib/Trash/TrashBackend.php
Specifically the events are:
\OC_Hook::emit('\OCP\Trashbin', 'delete', array('path' => $path));
\OC_Hook::emit('\OCP\Trashbin', 'preDelete', array('path' => $path));
\OCP\Util::emitHook('\OCA\Files_Trashbin\Trashbin', 'post_restore', array('filePath' => Filesystem::normalizePath('/' . $location . '/' . $uniqueFilename),
'trashPath' => Filesystem::normalizePath($file)));
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review lib/Trash/TrashBackend.php at the referenced deletion and restoration locations, then compare its behavior with the listed files_trashbin hook events. The work is complete when the trash backend emits the specified delete, preDelete, and post_restore notifications with the documented path values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100