do not check if unlink() was successful

This commit is contained in:
Uwe Steinmann 2015-08-10 22:06:00 +02:00
parent 8ffcfab6e4
commit c905e3a5eb

View File

@ -55,8 +55,7 @@ class SeedDMS_SQLiteFTS_Indexer {
* @param string $indexerDir directory on disk containing the index * @param string $indexerDir directory on disk containing the index
*/ */
static function create($indexerDir) { /* {{{ */ static function create($indexerDir) { /* {{{ */
if(!@unlink($indexerDir.'/index.db')) unlink($indexerDir.'/index.db');
return null;
$index = new SeedDMS_SQLiteFTS_Indexer($indexerDir); $index = new SeedDMS_SQLiteFTS_Indexer($indexerDir);
$sql = 'CREATE VIRTUAL TABLE docs USING fts4(title, comment, keywords, category, owner, content, created, notindexed=created, matchinfo=fts3)'; $sql = 'CREATE VIRTUAL TABLE docs USING fts4(title, comment, keywords, category, owner, content, created, notindexed=created, matchinfo=fts3)';
$res = $index->_conn->exec($sql); $res = $index->_conn->exec($sql);