diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-01-31 08:52:07 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-01-31 08:52:07 +0100 |
commit | 012d06e8a2f447ba340256eedcd69f68f40bcb9c (patch) | |
tree | b1d5d5c48839c84b64cc49907e7cf34f1dfe6644 /apps | |
parent | c877fbdac8b3cdeffa51fa3f6b1e1e983127113b (diff) | |
parent | 9ef96e4dd5ea10611e9741ae0303b328e7788be9 (diff) | |
download | nextcloud-server-012d06e8a2f447ba340256eedcd69f68f40bcb9c.tar.gz nextcloud-server-012d06e8a2f447ba340256eedcd69f68f40bcb9c.zip |
Merge pull request #13797 from owncloud/fix_move_del_of_remote_shares
make sure that we get the correct user from the path
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_encryption/lib/helper.php | 4 | ||||
-rw-r--r-- | apps/files_encryption/tests/helper.php | 1 | ||||
-rw-r--r-- | apps/files_trashbin/lib/trashbin.php | 1 |
3 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php index 553c52e72fe..ae9f0af4890 100644 --- a/apps/files_encryption/lib/helper.php +++ b/apps/files_encryption/lib/helper.php @@ -293,8 +293,8 @@ class Helper { public static function getUserFromPath($path) { $split = self::splitPath($path); - if (count($split) > 3 && ( - $split[2] === 'files' || $split[2] === 'files_versions' || $split[2] === 'cache')) { + if (count($split) > 2 && ( + $split[2] === 'files' || $split[2] === 'files_versions' || $split[2] === 'cache' || $split[2] === 'files_trashbin')) { $user = $split[1]; diff --git a/apps/files_encryption/tests/helper.php b/apps/files_encryption/tests/helper.php index 62fdb80d671..3c82b941347 100644 --- a/apps/files_encryption/tests/helper.php +++ b/apps/files_encryption/tests/helper.php @@ -219,6 +219,7 @@ class TestHelper extends TestCase { return array( array('/' . self::TEST_ENCRYPTION_HELPER_USER1 . '/files/foo.txt', self::TEST_ENCRYPTION_HELPER_USER1), array('//' . self::TEST_ENCRYPTION_HELPER_USER2 . '/files_versions/foo.txt', self::TEST_ENCRYPTION_HELPER_USER2), + array('/' . self::TEST_ENCRYPTION_HELPER_USER1 . '/files_trashbin/', self::TEST_ENCRYPTION_HELPER_USER1), array(self::TEST_ENCRYPTION_HELPER_USER1 . '//cache/foo/bar.txt', self::TEST_ENCRYPTION_HELPER_USER1), ); } diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php index ead7f3e09ca..8ce6d668d66 100644 --- a/apps/files_trashbin/lib/trashbin.php +++ b/apps/files_trashbin/lib/trashbin.php @@ -152,7 +152,6 @@ class Trashbin { self::setUpTrash($user); - $view = new \OC\Files\View('/' . $user); $path_parts = pathinfo($file_path); $filename = $path_parts['basename']; |