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

don't do the initial scanning of the users home folder trough the update system

parent 0622fa79
Branches
No related tags found
No related merge requests found
...@@ -633,13 +633,16 @@ class OC_FileCache{ ...@@ -633,13 +633,16 @@ class OC_FileCache{
} }
$mtime=$view->filemtime($path); $mtime=$view->filemtime($path);
$isDir=$view->is_dir($path); $isDir=$view->is_dir($path);
$path=$root.$path; $fullPath=$root.$path;
$query=OC_DB::prepare('SELECT mtime FROM *PREFIX*fscache WHERE path_hash=?'); $query=OC_DB::prepare('SELECT mtime FROM *PREFIX*fscache WHERE path_hash=?');
$result=$query->execute(array(md5($path))); $result=$query->execute(array(md5($fullPath)));
if($row=$result->fetchRow()){ if($row=$result->fetchRow()){
$cachedMTime=$row['mtime']; $cachedMTime=$row['mtime'];
return ($mtime>$cachedMTime); return ($mtime>$cachedMTime);
}else{//file not in cache, so it has to be updated }else{//file not in cache, so it has to be updated
if($path=='/' or $path==''){//dont auto update the root folder, it will be scanned
return false;
}
return true; return true;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment