Fix OC_Cache_File
This commit is contained in:
parent
0365f8fd01
commit
9e32e07306
|
@ -10,8 +10,8 @@
|
||||||
class OC_Cache_File{
|
class OC_Cache_File{
|
||||||
protected static $storage;
|
protected static $storage;
|
||||||
protected function getStorage() {
|
protected function getStorage() {
|
||||||
if (isset(self::$storage)) {
|
if (isset($this->storage)) {
|
||||||
return self::$storage;
|
return $this->storage;
|
||||||
}
|
}
|
||||||
if(OC_User::isLoggedIn()){
|
if(OC_User::isLoggedIn()){
|
||||||
$subdir = 'cache';
|
$subdir = 'cache';
|
||||||
|
@ -19,8 +19,8 @@ class OC_Cache_File{
|
||||||
if(!$view->file_exists($subdir)) {
|
if(!$view->file_exists($subdir)) {
|
||||||
$view->mkdir($subdir);
|
$view->mkdir($subdir);
|
||||||
}
|
}
|
||||||
self::$storage = new OC_FilesystemView('/'.OC_User::getUser().'/'.$subdir);
|
$this->storage = new OC_FilesystemView('/'.OC_User::getUser().'/'.$subdir);
|
||||||
return self::$storage;
|
return $this->storage;
|
||||||
}else{
|
}else{
|
||||||
OC_Log::write('core','Can\'t get cache storage, user not logged in', OC_Log::ERROR);
|
OC_Log::write('core','Can\'t get cache storage, user not logged in', OC_Log::ERROR);
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue