mirror of
https://github.com/nextcloud/server.git
synced 2026-03-28 13:23:49 -04:00
Merge pull request #30985 from rotdrop/bugfix/get-storage-info-unjail-shared-path
Use the unjailed-path in OC_Helper::getStorageInfo() for files located in SharedStorage.
This commit is contained in:
commit
f2cd30df8d
1 changed files with 4 additions and 1 deletions
|
|
@ -506,6 +506,9 @@ class OC_Helper {
|
|||
if ($storage->instanceOfStorage('\OCA\Files_Sharing\SharedStorage')) {
|
||||
$includeExtStorage = false;
|
||||
$sourceStorage = $storage->getSourceStorage();
|
||||
$internalPath = $storage->getUnjailedPath($rootInfo->getInternalPath());
|
||||
} else {
|
||||
$internalPath = $rootInfo->getInternalPath();
|
||||
}
|
||||
if ($includeExtStorage) {
|
||||
if ($storage->instanceOfStorage('\OC\Files\Storage\Home')
|
||||
|
|
@ -528,7 +531,7 @@ class OC_Helper {
|
|||
/** @var \OC\Files\Storage\Wrapper\Quota $storage */
|
||||
$quota = $sourceStorage->getQuota();
|
||||
}
|
||||
$free = $sourceStorage->free_space($rootInfo->getInternalPath());
|
||||
$free = $sourceStorage->free_space($internalPath);
|
||||
if ($free >= 0) {
|
||||
$total = $free + $used;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue