if (empty(self::$mimetypeIds)) {
$this->loadMimetypes();
}
-
+
if (!isset(self::$mimetypeIds[$mime])) {
try{
$result = \OC_DB::executeAudited('INSERT INTO `*PREFIX*mimetypes`(`mimetype`) VALUES(?)', array($mime));
\OC_Log::write('core', 'Exception during mimetype insertion: ' . $e->getmessage(), \OC_Log::DEBUG);
return -1;
}
- }
-
+ }
+
return self::$mimetypeIds[$mime];
}
$this->remove($child['path']);
}
}
-
+
$sql = 'DELETE FROM `*PREFIX*filecache` WHERE `fileid` = ?';
\OC_DB::executeAudited($sql, array($entry['fileid']));
}
$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);
}