From 02b9bad81b51a37dd60cab34b80796c79390c426 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 26 Jan 2015 12:22:22 +0100 Subject: Fix bogus deletion on copy + unlink through rename Cross-storage rename would cause copy + unlink. That unlink operation must not trigger the trashbin. --- apps/files_trashbin/tests/storage.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apps/files_trashbin/tests') diff --git a/apps/files_trashbin/tests/storage.php b/apps/files_trashbin/tests/storage.php index 050d5fcee5b..d9a18e5a15c 100644 --- a/apps/files_trashbin/tests/storage.php +++ b/apps/files_trashbin/tests/storage.php @@ -37,6 +37,9 @@ class Storage extends \Test\TestCase { protected function setUp() { parent::setUp(); + \OC_Hook::clear(); + \OCA\Files_Trashbin\Trashbin::registerHooks(); + $this->user = $this->getUniqueId('user'); \OC::$server->getUserManager()->createUser($this->user, $this->user); @@ -58,6 +61,7 @@ class Storage extends \Test\TestCase { \OC\Files\Filesystem::mount($this->originalStorage, array(), '/'); $this->logout(); \OC_User::deleteUser($this->user); + \OC_Hook::clear(); parent::tearDown(); } -- cgit v1.2.3