From 5db4f6510bfe6197038f9e343406689994421fd2 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Tue, 3 Sep 2024 14:43:34 +0100 Subject: [PATCH] [5.x] Prevent error when writing to Comb index file (#10712) --- src/Search/Comb/Index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Search/Comb/Index.php b/src/Search/Comb/Index.php index 9b303a6ff4..343e552aa5 100644 --- a/src/Search/Comb/Index.php +++ b/src/Search/Comb/Index.php @@ -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); }