diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-12-15 03:10:56 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-12-15 03:10:56 +0100 |
commit | 4be039e6cbc0a826b07fc2af1a6c6d94888a9187 (patch) | |
tree | facd0f5e7cb38c7ae0c7a84a5d29cfc1e4fc5173 /lib/files/cache/watcher.php | |
parent | bc52f121626bb1bb1f67bc1f876d0420d153b3d1 (diff) | |
download | nextcloud-server-4be039e6cbc0a826b07fc2af1a6c6d94888a9187.tar.gz nextcloud-server-4be039e6cbc0a826b07fc2af1a6c6d94888a9187.zip |
Filecache Watcher: use scan or scanFile based on the current item, not the cached item
Diffstat (limited to 'lib/files/cache/watcher.php')
-rw-r--r-- | lib/files/cache/watcher.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/files/cache/watcher.php b/lib/files/cache/watcher.php index d6039d9945c..31059ec7f56 100644 --- a/lib/files/cache/watcher.php +++ b/lib/files/cache/watcher.php @@ -44,12 +44,14 @@ class Watcher { public function checkUpdate($path) { $cachedEntry = $this->cache->get($path); if ($this->storage->hasUpdated($path, $cachedEntry['mtime'])) { - if ($cachedEntry['mimetype'] === 'httpd/unix-directory') { + if ($this->storage->is_dir($path)) { $this->scanner->scan($path, Scanner::SCAN_SHALLOW); - $this->cleanFolder($path); } else { $this->scanner->scanFile($path); } + if ($cachedEntry['mimetype'] === 'httpd/unix-directory') { + $this->cleanFolder($path); + } $this->cache->correctFolderSize($path); } } |