Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/files
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-11-22 20:34:58 +0400
committerVincent Petry <pvince81@owncloud.com>2013-11-22 20:34:58 +0400
commit880769976bbc8c75186c89268c78bc40efb80998 (patch)
treea3dff4bd4a46a846f1a76e388bf32de7a8ab3342 /lib/files
parent2565a94e7d0785433dff73a022ae712bee24ca9f (diff)
parent5e6ea1565af95298a7cae39df561aa01d74b4862 (diff)
Merge pull request #5934 from owncloud/stable5-excludeextstoragefromquota
[Stable5] Exclude ext storage from quota
Diffstat (limited to 'lib/files')
-rw-r--r--lib/files/filesystem.php6
-rw-r--r--lib/files/view.php6
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php
index 1850d50f971..95bdd100cbf 100644
--- a/lib/files/filesystem.php
+++ b/lib/files/filesystem.php
@@ -624,6 +624,8 @@ class Filesystem {
* get the filesystem info
*
* @param string $path
+ * @param boolean $includeMountPoints whether to add mountpoint sizes,
+ * defaults to true
* @return array
*
* returns an associative array with the following keys:
@@ -633,8 +635,8 @@ class Filesystem {
* - encrypted
* - versioned
*/
- public static function getFileInfo($path) {
- return self::$defaultInstance->getFileInfo($path);
+ public static function getFileInfo($path, $includeMountPoints = true) {
+ return self::$defaultInstance->getFileInfo($path, $includeMountPoints);
}
/**
diff --git a/lib/files/view.php b/lib/files/view.php
index 65c5a527a1b..19dea87e3bc 100644
--- a/lib/files/view.php
+++ b/lib/files/view.php
@@ -754,6 +754,8 @@ class View {
* get the filesystem info
*
* @param string $path
+ * @param boolean $includeMountPoints whether to add mountpoint sizes,
+ * defaults to true
* @return array
*
* returns an associative array with the following keys:
@@ -763,7 +765,7 @@ class View {
* - encrypted
* - versioned
*/
- public function getFileInfo($path) {
+ public function getFileInfo($path, $includeMountPoints = true) {
$data = array();
if (!Filesystem::isValidPath($path)) {
return $data;
@@ -790,7 +792,7 @@ class View {
$data = $cache->get($internalPath);
if ($data and $data['fileid']) {
- if ($data['mimetype'] === 'httpd/unix-directory') {
+ if ($includeMountPoints and $data['mimetype'] === 'httpd/unix-directory') {
//add the sizes of other mountpoints to the folder
$mountPoints = Filesystem::getMountPoints($path);
foreach ($mountPoints as $mountPoint) {