fix updating the filecache for when contents of a folder has changed
This commit is contained in:
parent
258782584e
commit
113c339c41
1 changed files with 8 additions and 5 deletions
|
@ -81,10 +81,13 @@ class OC_FileCache_Update{
|
||||||
$dh=$view->opendir($path.'/');
|
$dh=$view->opendir($path.'/');
|
||||||
if($dh) {//check for changed/new files
|
if($dh) {//check for changed/new files
|
||||||
while (($filename = readdir($dh)) !== false) {
|
while (($filename = readdir($dh)) !== false) {
|
||||||
if($filename != '.' and $filename != '..') {
|
if($filename != '.' and $filename != '..' and $filename != '') {
|
||||||
$file=$path.'/'.$filename;
|
$file=$path.'/'.$filename;
|
||||||
if(self::hasUpdated($file, $root)) {
|
$isDir=$view->is_dir($file);
|
||||||
if($root===false) {//filesystem hooks are only valid for the default root
|
if(self::hasUpdated($file, $root, $isDir)) {
|
||||||
|
if($isDir){
|
||||||
|
self::updateFolder($file, $root);
|
||||||
|
}elseif($root===false) {//filesystem hooks are only valid for the default root
|
||||||
OC_Hook::emit('OC_Filesystem', 'post_write', array('path'=>$file));
|
OC_Hook::emit('OC_Filesystem', 'post_write', array('path'=>$file));
|
||||||
}else{
|
}else{
|
||||||
self::update($file, $root);
|
self::update($file, $root);
|
||||||
|
@ -136,7 +139,7 @@ class OC_FileCache_Update{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* update the filecache according to changes to the fileysystem
|
* update the filecache according to changes to the filesystem
|
||||||
* @param string path
|
* @param string path
|
||||||
* @param string root (optional)
|
* @param string root (optional)
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue