* - versioned
*/
public static function getFolderContent($path,$root='',$mimetype_filter=''){
- if(self::isUpdated($path,$root)){
+ if(self::isUpdated($path,$root,true)){
self::updateFolder($path,$root);
}
if(!$root){
* check if a file or folder is updated outside owncloud
* @param string path
* @param string root (optional)
+ * @param bool folder (optional)
* @return bool
*/
- public static function isUpdated($path,$root=''){
+ public static function isUpdated($path,$root='',$folder=false){
if(!$root){
$root=OC_Filesystem::getRoot();
$view=OC_Filesystem::getView();
if(!$view->file_exists($path)){
return false;
}
- $mtime=$view->filemtime($path);
+ $mtime=$view->filemtime($path.(($folder)?'/':''));
$isDir=$view->is_dir($path);
$fullPath=$root.$path;
$query=OC_DB::prepare('SELECT mtime FROM *PREFIX*fscache WHERE path_hash=?');