diff options
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); } } |