diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-07-10 14:42:15 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-07-10 14:42:15 +0200 |
commit | b470869114f7b6d7550fd8a32f82ea4fb6e361e7 (patch) | |
tree | ea835ef0a282455c8acc0db83025bf1b50479e60 /lib/filecache.php | |
parent | 71f9a6c09324f841e0c59d2384ff3ec94b941c82 (diff) | |
download | nextcloud-server-b470869114f7b6d7550fd8a32f82ea4fb6e361e7.tar.gz nextcloud-server-b470869114f7b6d7550fd8a32f82ea4fb6e361e7.zip |
when checking for updates in the filecache, explicitly state that we are querying a folder
Diffstat (limited to 'lib/filecache.php')
-rw-r--r-- | lib/filecache.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/filecache.php b/lib/filecache.php index a0ad2be4f77..57c6f1915c9 100644 --- a/lib/filecache.php +++ b/lib/filecache.php @@ -256,7 +256,7 @@ class OC_FileCache{ * - 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){ @@ -633,9 +633,10 @@ class OC_FileCache{ * 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(); @@ -648,7 +649,7 @@ class OC_FileCache{ 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=?'); |