Skip to content

Commit

Permalink
索引所在目录添加 .gitignore 文件
Browse files Browse the repository at this point in the history
  • Loading branch information
vanry committed Jan 14, 2021
1 parent c1f9964 commit 0b8b8cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Engines/TNTSearchEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ protected function createIndex($model)
{
if (! file_exists($this->tnt->config['storage'])) {
mkdir($this->tnt->config['storage'], 0755, true);

file_put_contents($this->tnt->config['storage'].'.gitignore', "*\n!.gitignore\n");
}

$this->tnt->createIndex($this->indexName($model));
Expand Down

0 comments on commit 0b8b8cd

Please sign in to comment.