Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin/lib/trashbin.php')
-rw-r--r--apps/files_trashbin/lib/trashbin.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php
index 8aea6d1a5e3..11b4a4cc033 100644
--- a/apps/files_trashbin/lib/trashbin.php
+++ b/apps/files_trashbin/lib/trashbin.php
@@ -97,6 +97,7 @@ class Trashbin {
* move file to the trash bin
*
* @param string $file_path path to the deleted file/directory relative to the files root directory
+ * @return bool
*/
public static function move2trash($file_path) {
$user = \OCP\User::getUser();
@@ -109,6 +110,9 @@ class Trashbin {
}
self::setUpTrash($user);
+ if ($owner !== $user) {
+ self::setUpTrash($owner);
+ }
$view = new \OC\Files\View('/' . $user);
$path_parts = pathinfo($file_path);
@@ -279,7 +283,7 @@ class Trashbin {
$rootView->rename($sharekeys, $user . '/files_trashbin/share-keys/' . $filename . '.d' . $timestamp);
} else {
// handle share-keys
- $matches = \OCA\Encryption\Helper::findShareKeys($ownerPath, $sharekeys, $rootView);
+ $matches = \OCA\Encryption\Helper::findShareKeys($file_path, $sharekeys, $rootView);
foreach ($matches as $src) {
// get source file parts
$pathinfo = pathinfo($src);