Skip to content

Commit 05be7dd

Browse files
committed
Make dir when not exists
1 parent ec6a857 commit 05be7dd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/DebugBar/Storage/FileStorage.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ class FileStorage implements StorageInterface
2323
public function __construct($dirname)
2424
{
2525
$this->dirname = rtrim($dirname, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
26+
if (!file_exists($this->dirname)) {
27+
mkdir($this->dirname, 0777, true);
28+
}
2629
}
2730

2831
/**
@@ -77,4 +80,4 @@ public function makeFilename($id)
7780
{
7881
return $this->dirname . "$id.json";
7982
}
80-
}
83+
}

0 commit comments

Comments
 (0)