remove non existing files from the cache when rescanning a folder
This commit is contained in:
parent
09a5c59cca
commit
e3adbcb7d5
|
@ -522,6 +522,9 @@ class OC_FileCache{
|
|||
$view=new OC_FilesystemView(($root=='/')?'':$root);
|
||||
}
|
||||
self::scanFile($path,$root);
|
||||
if(self::inCache($path)){
|
||||
self::updateFolder($path,$root);
|
||||
}else{
|
||||
$dh=$view->opendir($path.'/');
|
||||
$totalSize=0;
|
||||
if($dh){
|
||||
|
@ -543,6 +546,7 @@ class OC_FileCache{
|
|||
}
|
||||
self::increaseSize($view->getRoot().$path,$totalSize);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* scan a single file
|
||||
|
|
|
@ -275,6 +275,7 @@ class OC_Filesystem{
|
|||
if(class_exists($class)){
|
||||
return new $class($arguments);
|
||||
}else{
|
||||
OC_Log::write('core','storage backend '.$class.' not found',OC_Log::ERROR);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue