diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-06-17 01:26:30 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-06-17 01:31:57 +0200 |
commit | b38e46276f247315772c5d46f0c73ea11a139cef (patch) | |
tree | 4b9ee0463b8dc6bc3af131b692477c447eee4b89 /lib/filecache | |
parent | 6f93176a4be21dcda1009d9cea052e5fdb50ae16 (diff) | |
download | nextcloud-server-b38e46276f247315772c5d46f0c73ea11a139cef.tar.gz nextcloud-server-b38e46276f247315772c5d46f0c73ea11a139cef.zip |
when checking if the content of a folder has been updated, exlicitly state that we are checking a folder
solves some issues with external storages not updating correctly
Diffstat (limited to 'lib/filecache')
-rw-r--r-- | lib/filecache/update.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/filecache/update.php b/lib/filecache/update.php index 9e23c6dfe7b..2e3eb67da08 100644 --- a/lib/filecache/update.php +++ b/lib/filecache/update.php @@ -15,9 +15,10 @@ class OC_FileCache_Update{ * check if a file or folder is updated outside owncloud * @param string path * @param string root (optional) + * @param boolean folder * @return bool */ - public static function hasUpdated($path,$root=false){ + public static function hasUpdated($path,$root=false,$folder=false){ if($root===false){ $view=OC_Filesystem::getView(); }else{ @@ -29,7 +30,11 @@ class OC_FileCache_Update{ $cachedData=OC_FileCache_Cached::get($path,$root); if(isset($cachedData['mtime'])){ $cachedMTime=$cachedData['mtime']; - return $view->hasUpdated($path,$cachedMTime); + if($folder){ + return $view->hasUpdated($path.'/',$cachedMTime); + }else{ + return $view->hasUpdated($path,$cachedMTime); + } }else{//file not in cache, so it has to be updated if(($path=='/' or $path=='') and $root===false){//dont auto update the home folder, it will be scanned return false; |