mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-06 14:19:23 +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
@ -6,6 +6,7 @@ Yii Framework 2 Change Log
|
||||
|
||||
- Bug #8723: Fixed `yii\helpers\VarDumper::export()` unable to export circle referenced objects with `Closure` (klimov-paul)
|
||||
- Bug #9108: Negative number resulted in no formatting when using `Formatter::asSize()` or `Formatter::asShortSize` (nxnx, cebe)
|
||||
- Bug #9288: Fixed `FileHelper::createDirectory` directory creation to be concurrency friendly (dynasource)
|
||||
- Bug #9314: Fixed `yii\rbac\DbManager::getPermissionsByUser()` not returning permissions directly assigned to a user (hesna)
|
||||
- Bug #9415: Fixed regression in 2.0.6 where on Oracle DB `PDO::ATTR_CASE = PDO::CASE_LOWER` did not work anymore (cebe)
|
||||
- Bug #9442: Fixed `yii\db\Migration::renameTable()` caused fatal error when using SQLite driver (fetus-hina)
|
||||
|
@ -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