Skip to content

Commit

Permalink
Merge pull request #32365 from nextcloud/backport/32335/stable24
Browse files Browse the repository at this point in the history
[stable24] don't unjail the path when getting the storage info
  • Loading branch information
CarlSchwan authored May 13, 2022
2 parents 2d52bda + cc4aab1 commit 861a787
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/private/legacy/OC_Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,6 @@ public static function getStorageInfo($path, $rootInfo = null, $includeMountPoin
$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')
Expand All @@ -545,7 +542,7 @@ public static function getStorageInfo($path, $rootInfo = null, $includeMountPoin
$quota = $sourceStorage->getQuota();
}
try {
$free = $sourceStorage->free_space($internalPath);
$free = $sourceStorage->free_space($rootInfo->getInternalPath());
} catch (\Exception $e) {
if ($path === "") {
throw $e;
Expand Down

0 comments on commit 861a787

Please sign in to comment.