get correct user for paths to the trash bin, needed for remote shares if the size of of trash gets calculated
This commit is contained in:
parent
f4d20dc1f3
commit
ed29c6ce86
|
@ -293,8 +293,8 @@ class Helper {
|
||||||
public static function getUserFromPath($path) {
|
public static function getUserFromPath($path) {
|
||||||
$split = self::splitPath($path);
|
$split = self::splitPath($path);
|
||||||
|
|
||||||
if (count($split) > 3 && (
|
if (count($split) > 2 && (
|
||||||
$split[2] === 'files' || $split[2] === 'files_versions' || $split[2] === 'cache')) {
|
$split[2] === 'files' || $split[2] === 'files_versions' || $split[2] === 'cache' || $split[2] === 'files_trashbin')) {
|
||||||
|
|
||||||
$user = $split[1];
|
$user = $split[1];
|
||||||
|
|
||||||
|
|
|
@ -219,6 +219,7 @@ class TestHelper extends TestCase {
|
||||||
return array(
|
return array(
|
||||||
array('/' . self::TEST_ENCRYPTION_HELPER_USER1 . '/files/foo.txt', self::TEST_ENCRYPTION_HELPER_USER1),
|
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_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),
|
array(self::TEST_ENCRYPTION_HELPER_USER1 . '//cache/foo/bar.txt', self::TEST_ENCRYPTION_HELPER_USER1),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue