From dd7b3df618bfa987e12bed51f75ec57ef8b2028a Mon Sep 17 00:00:00 2001 From: John Koster Date: Wed, 16 Aug 2023 17:46:23 -0500 Subject: [PATCH] Creates directory if it does not exist (corrects issue with responses tag) --- .../Storage/Drivers/Local/LocalThreadStorageManager.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Core/Storage/Drivers/Local/LocalThreadStorageManager.php b/src/Core/Storage/Drivers/Local/LocalThreadStorageManager.php index aea5f3f3..15402990 100644 --- a/src/Core/Storage/Drivers/Local/LocalThreadStorageManager.php +++ b/src/Core/Storage/Drivers/Local/LocalThreadStorageManager.php @@ -368,6 +368,12 @@ private function saveMetaData($contextId, ThreadMetaData $data) $targetPath = $this->storagePath.Paths::SYM_FORWARD_SEPARATOR. $contextId.Paths::SYM_FORWARD_SEPARATOR.self::EXT_THREAD_META; + $targetDir = dirname($targetPath); + + if (! file_exists($targetDir)) { + mkdir($targetDir, 0755, true); + } + $wasSuccess = file_put_contents($targetPath, $this->yamlParser->toYaml($data->toArray(), null)); if ($wasSuccess === false) {