Merge pull request #32335 from nextcloud/storage-info-dont-unjail

Don't unjail the path when getting the storage info
pull/32374/head
Carl Schwan 2022-05-12 20:59:06 +07:00 committed by GitHub
commit febbd21814
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

@ -519,9 +519,6 @@ class OC_Helper {
$sourceStorage = $storage;
if ($storage->instanceOfStorage('\OCA\Files_Sharing\SharedStorage')) {
$includeExtStorage = false;
$internalPath = $storage->getUnjailedPath($rootInfo->getInternalPath());
} else {
$internalPath = $rootInfo->getInternalPath();
}
if ($includeExtStorage) {
if ($storage->instanceOfStorage('\OC\Files\Storage\Home')
@ -545,7 +542,7 @@ class OC_Helper {
$quota = $sourceStorage->getQuota();
}
try {
$free = $sourceStorage->free_space($internalPath);
$free = $sourceStorage->free_space($rootInfo->getInternalPath());
} catch (\Exception $e) {
if ($path === "") {
throw $e;