Skip to content

Commit

Permalink
[5.x] Prevent error when writing to Comb index file (#10712)
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean authored Sep 3, 2024
1 parent 06ad516 commit 5db4f65
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Search/Comb/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ public function deleteIndex()

protected function save($documents)
{
app('files')->ensureDirectoryExists(pathinfo($this->path())['dirname']);

app('files')->put($this->path(), $documents->toJson(), lock: true);
}

Expand Down

0 comments on commit 5db4f65

Please sign in to comment.