Skip to content

Commit

Permalink
Creates directory if it does not exist (corrects issue with responses…
Browse files Browse the repository at this point in the history
… tag)
  • Loading branch information
JohnathonKoster committed Aug 16, 2023
1 parent d167d62 commit dd7b3df
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Core/Storage/Drivers/Local/LocalThreadStorageManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit dd7b3df

Please sign in to comment.