mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 21:16:07 +00:00
check if index exists before removing it
This commit is contained in:
parent
07f5512c9a
commit
62cd6e0602
|
@ -55,7 +55,8 @@ 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) { /* {{{ */
|
||||||
unlink($indexerDir.'/index.db');
|
if(file_exists($indexerDir.'/index.db'))
|
||||||
|
unlink($indexerDir.'/index.db');
|
||||||
$index = new SeedDMS_SQLiteFTS_Indexer($indexerDir);
|
$index = new SeedDMS_SQLiteFTS_Indexer($indexerDir);
|
||||||
/* Make sure the sequence of fields is identical to the field list
|
/* Make sure the sequence of fields is identical to the field list
|
||||||
* in SeedDMS_SQLiteFTS_Term
|
* in SeedDMS_SQLiteFTS_Term
|
||||||
|
|
Loading…
Reference in New Issue
Block a user