mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 13:02:24 +08:00
Fixes #9288: Fixed FileHelper::createDirectory directory creation to be concurrency friendly
This commit is contained in:
committed by
Alexander Makarov
parent
5569eaae06
commit
4d21c48bc4
@ -462,6 +462,9 @@ class BaseFileHelper
|
||||
$result = mkdir($path, $mode);
|
||||
chmod($path, $mode);
|
||||
} catch (\Exception $e) {
|
||||
if(is_dir($path)){ // #9288
|
||||
return true;
|
||||
}
|
||||
throw new \yii\base\Exception("Failed to create directory '$path': " . $e->getMessage(), $e->getCode(), $e);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user