From f27b6b0ab87b041229d564bbbabcd86a98dc6325 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Thu, 30 Oct 2014 10:51:25 +0100 Subject: [PATCH] don't scan part files --- lib/private/files/cache/cache.php | 8 ++++---- lib/private/files/view.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php index 7ea00325a10..2c12f834518 100644 --- a/lib/private/files/cache/cache.php +++ b/lib/private/files/cache/cache.php @@ -71,7 +71,7 @@ class Cache { if (empty(self::$mimetypeIds)) { $this->loadMimetypes(); } - + if (!isset(self::$mimetypeIds[$mime])) { try{ $result = \OC_DB::executeAudited('INSERT INTO `*PREFIX*mimetypes`(`mimetype`) VALUES(?)', array($mime)); @@ -82,8 +82,8 @@ class Cache { \OC_Log::write('core', 'Exception during mimetype insertion: ' . $e->getmessage(), \OC_Log::DEBUG); return -1; } - } - + } + return self::$mimetypeIds[$mime]; } @@ -371,7 +371,7 @@ class Cache { $this->remove($child['path']); } } - + $sql = 'DELETE FROM `*PREFIX*filecache` WHERE `fileid` = ?'; \OC_DB::executeAudited($sql, array($entry['fileid'])); } diff --git a/lib/private/files/view.php b/lib/private/files/view.php index e15a3063e94..0e4da30f7b9 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -902,7 +902,7 @@ class View { $scanner = $storage->getScanner($internalPath); $scanner->scan($internalPath, Cache\Scanner::SCAN_SHALLOW); $data = $cache->get($internalPath); - } else if ($watcher->checkUpdate($internalPath, $data)) { + } else if (!Cache\Scanner::isPartialFile($internalPath) && $watcher->checkUpdate($internalPath, $data)) { $this->updater->propagate($path); $data = $cache->get($internalPath); } -- 2.39.5