]> source.dussan.org Git - nextcloud-server.git/commitdiff
don't scan part files
authorBjoern Schiessle <schiessle@owncloud.com>
Thu, 30 Oct 2014 09:51:25 +0000 (10:51 +0100)
committerBjoern Schiessle <schiessle@owncloud.com>
Fri, 7 Nov 2014 14:20:51 +0000 (15:20 +0100)
lib/private/files/cache/cache.php
lib/private/files/view.php

index 7ea00325a1015d34bb51e9877d2422e66b69f76c..2c12f834518191cdc6ad15dcd5cd89043e924e28 100644 (file)
@@ -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']));
        }
index e15a3063e94a0e74d776b91a04192896a9f519cd..0e4da30f7b93d55fd7e69428a91d4c02f2caf2d1 100644 (file)
@@ -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);
                        }