diff --git a/lib/Trash/TrashBackend.php b/lib/Trash/TrashBackend.php index e1238519d..ac8aa27f7 100644 --- a/lib/Trash/TrashBackend.php +++ b/lib/Trash/TrashBackend.php @@ -172,6 +172,14 @@ public function restoreItem(ITrashItem $item) { $targetFolder->getStorage()->moveFromStorage($trashStorage, $node->getInternalPath(), $targetLocation); $targetFolder->getStorage()->getUpdater()->renameFromStorage($trashStorage, $node->getInternalPath(), $targetLocation); $this->trashManager->removeItem((int)$folderId, $item->getName(), $item->getDeletedTime()); + \OCP\Util::emitHook( + '\OCA\Files_Trashbin\Trashbin', + 'post_restore', + [ + 'filePath' => '/' . $item->getGroupFolderMountPoint() . '/' . $originalLocation, + 'trashPath' => $item->getPath(), + ] + ); } /**