[Pkg-owncloud-commits] [owncloud] 09/42: When reading the size of "files" mountpoints need to be excluded

David Prévot taffit at moszumanska.debian.org
Wed Jan 22 21:21:48 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 127ab3cb471802deb9b9f9e771d29f53ec027644
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Mon Jan 20 17:10:09 2014 +0100

    When reading the size of "files" mountpoints need to be excluded
    
    The versions and trashbin app are now passing "includeMountPoints=false"
    to "getFileInfo()" to make sure that the calculated total size doesn't
    include mount points like Shared or external storage.
    
    This is because the default call (legacy) used to return the size of
    mount points as well.
    
    Fixes #6731
    
    Backport of ca57a84 to stable6
---
 apps/files_trashbin/lib/trashbin.php | 2 +-
 apps/files_versions/lib/versions.php | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php
index 769fd8d..7544980 100644
--- a/apps/files_trashbin/lib/trashbin.php
+++ b/apps/files_trashbin/lib/trashbin.php
@@ -734,7 +734,7 @@ class Trashbin {
 		// calculate available space for trash bin
 		// subtract size of files and current trash bin size from quota
 		if ($softQuota) {
-			$rootInfo = $view->getFileInfo('/files/');
+			$rootInfo = $view->getFileInfo('/files/', false);
 			$free = $quota - $rootInfo['size']; // remaining free space for user
 			if ($free > 0) {
 				$availableSpace = ($free * self::DEFAULTMAXSIZE / 100) - $trashbinSize; // how much space can be used for versions
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index 7e6cc81..f268fa1 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -445,7 +445,7 @@ class Storage {
 			// subtract size of files and current versions size from quota
 			if ($softQuota) {
 				$files_view = new \OC\Files\View('/'.$uid.'/files');
-				$rootInfo = $files_view->getFileInfo('/');
+				$rootInfo = $files_view->getFileInfo('/', false);
 				$free = $quota-$rootInfo['size']; // remaining free space for user
 				if ( $free > 0 ) {
 					$availableSpace = ($free * self::DEFAULTMAXSIZE / 100) - ($versionsSize + $offset); // how much space can be used for versions

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list