aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2022-02-04 00:03:56 +0100
committerGitHub <noreply@github.com>2022-02-04 00:03:56 +0100
commitf2cd30df8dd4e399ed86d4efcbd583fb91ca3f18 (patch)
tree125a8121dc133da4a246333c127648e704bc09af
parent8d631a096a24f8eb753b25d1272080ba8499e0fd (diff)
parenta355410b88d1e36672795df46e7d3c7f703a47aa (diff)
downloadnextcloud-server-f2cd30df8dd4e399ed86d4efcbd583fb91ca3f18.tar.gz
nextcloud-server-f2cd30df8dd4e399ed86d4efcbd583fb91ca3f18.zip
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.
-rw-r--r--lib/private/legacy/OC_Helper.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php
index 52c49f1d795..efb9252e346 100644
--- a/lib/private/legacy/OC_Helper.php
+++ b/lib/private/legacy/OC_Helper.php
@@ -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 {