Create folder in KeyStore only if it not exists
This commit is contained in:
@@ -67,7 +67,9 @@ class KeyStore {
|
||||
|
||||
try {
|
||||
// TODO: Replace with async version once available
|
||||
mkdir(dirname($file), 0755, true);
|
||||
if (!file_exists($file)) {
|
||||
mkdir(dirname($file), 0755, true);
|
||||
}
|
||||
|
||||
yield \Amp\File\put($file, $keyPair->getPrivate());
|
||||
yield \Amp\File\chmod($file, 0600);
|
||||
|
||||
Reference in New Issue
Block a user