Merge pull request #13797 from owncloud/fix_move_del_of_remote_shares
make sure that we get the correct user from the path
This commit is contained in:
commit
012d06e8a2
|
@ -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];
|
||||
|
||||
|
|
|
@ -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),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -152,7 +152,6 @@ class Trashbin {
|
|||
|
||||
self::setUpTrash($user);
|
||||
|
||||
$view = new \OC\Files\View('/' . $user);
|
||||
$path_parts = pathinfo($file_path);
|
||||
|
||||
$filename = $path_parts['basename'];
|
||||
|
|
Loading…
Reference in New Issue