diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-08-08 15:00:47 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-08-08 15:48:59 +0200 |
commit | 07d5725de2aa597f41bfc25f676af935b60a52be (patch) | |
tree | 757acc2f7cebd91f279fa0b3ea45f08e9121485f /apps/files_trashbin | |
parent | fa260b1649e200a0e6a4d3d921bcf22c414d4824 (diff) | |
download | nextcloud-server-07d5725de2aa597f41bfc25f676af935b60a52be.tar.gz nextcloud-server-07d5725de2aa597f41bfc25f676af935b60a52be.zip |
Fix trashbin when deleting a file over an external share
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r-- | apps/files_trashbin/lib/trashbin.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php index ee3969323cf..feb150ddc9a 100644 --- a/apps/files_trashbin/lib/trashbin.php +++ b/apps/files_trashbin/lib/trashbin.php @@ -22,6 +22,8 @@ namespace OCA\Files_Trashbin; +use OC\Files\Filesystem; + class Trashbin { // how long do we keep files in the trash bin if no other value is defined in the config file (unit: days) @@ -99,7 +101,9 @@ class Trashbin { * @param string $file_path path to the deleted file/directory relative to the files root directory */ public static function move2trash($file_path) { - $user = \OCP\User::getUser(); + // get the user for which the filesystem is setup + $root = Filesystem::getRoot(); + list(, $user) = explode('/', $root); $size = 0; list($owner, $ownerPath) = self::getUidAndFilename($file_path); self::setUpTrash($user); |