Fixes #9288: Fixed FileHelper::createDirectory directory creation to be concurrency friendly

This commit is contained in:
Boudewijn Vahrmeijer
2015-08-03 12:40:50 +02:00
committed by Alexander Makarov
parent 5569eaae06
commit 4d21c48bc4
2 changed files with 4 additions and 0 deletions

View File

@ -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)

View File

@ -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);
}