Skip to content
Snippets Groups Projects
Commit 2a8ff8a0 authored by Robin Appelman's avatar Robin Appelman
Browse files

fix problem with quota proxy when using copy

parent 82ffefb9
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment