Merge pull request #10292 from owncloud/external-share-delete

Fix trashbin when deleting a file over an external share
This commit is contained in:
Morris Jobke 2014-12-23 11:21:06 +01:00
commit 5352b4b2b8
2 changed files with 5 additions and 2 deletions

View File

@ -54,7 +54,6 @@ $server->subscribeEvent('beforeMethod', function () use ($server, $objectTree, $
$ownerView = \OC\Files\Filesystem::getView();
$path = $ownerView->getPath($fileId);
$view = new \OC\Files\View($ownerView->getAbsolutePath($path));
$rootInfo = $view->getFileInfo('');

View File

@ -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)
@ -136,7 +138,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);