diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-09-17 22:15:45 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-09-17 22:16:07 +0200 |
commit | 2a8ff8a0d49f136f7b31fbaf1147396574f5683c (patch) | |
tree | 7d1c4bcd5ca647a65f26a6c2e0fbb7d9b62336b4 /lib/fileproxy/quota.php | |
parent | 82ffefb99b5a625e5ebb7dcdeb32c4ca910e8097 (diff) | |
download | nextcloud-server-2a8ff8a0d49f136f7b31fbaf1147396574f5683c.tar.gz nextcloud-server-2a8ff8a0d49f136f7b31fbaf1147396574f5683c.zip |
fix problem with quota proxy when using copy
Diffstat (limited to 'lib/fileproxy/quota.php')
-rw-r--r-- | lib/fileproxy/quota.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/fileproxy/quota.php b/lib/fileproxy/quota.php index adbff3d301a..5a0dbdb6fe2 100644 --- a/lib/fileproxy/quota.php +++ b/lib/fileproxy/quota.php @@ -26,6 +26,7 @@ */ class OC_FileProxy_Quota extends OC_FileProxy{ + static $rootView; private $userQuota=-1; /** @@ -86,7 +87,10 @@ class OC_FileProxy_Quota extends OC_FileProxy{ } public function preCopy($path1,$path2) { - return (OC_Filesystem::filesize($path1)<$this->getFreeSpace() or $this->getFreeSpace()==0); + if(!self::$rootView){ + self::$rootView = new OC_FilesystemView(''); + } + return (self::$rootView->filesize($path1)<$this->getFreeSpace() or $this->getFreeSpace()==0); } public function preFromTmpFile($tmpfile,$path) { @@ -96,4 +100,4 @@ class OC_FileProxy_Quota extends OC_FileProxy{ public function preFromUploadedFile($tmpfile,$path) { return (filesize($tmpfile)<$this->getFreeSpace() or $this->getFreeSpace()==0); } -}
\ No newline at end of file +} |