fix problem with quota proxy when using copy
This commit is contained in:
parent
82ffefb99b
commit
2a8ff8a0d4
|
@ -26,6 +26,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class OC_FileProxy_Quota extends OC_FileProxy{
|
class OC_FileProxy_Quota extends OC_FileProxy{
|
||||||
|
static $rootView;
|
||||||
private $userQuota=-1;
|
private $userQuota=-1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -86,7 +87,10 @@ class OC_FileProxy_Quota extends OC_FileProxy{
|
||||||
}
|
}
|
||||||
|
|
||||||
public function preCopy($path1,$path2) {
|
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) {
|
public function preFromTmpFile($tmpfile,$path) {
|
||||||
|
@ -96,4 +100,4 @@ class OC_FileProxy_Quota extends OC_FileProxy{
|
||||||
public function preFromUploadedFile($tmpfile,$path) {
|
public function preFromUploadedFile($tmpfile,$path) {
|
||||||
return (filesize($tmpfile)<$this->getFreeSpace() or $this->getFreeSpace()==0);
|
return (filesize($tmpfile)<$this->getFreeSpace() or $this->getFreeSpace()==0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue