mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
修复并发创建目录报错的问题
This commit is contained in:
@@ -150,12 +150,19 @@ class File extends SplFileObject
|
||||
*/
|
||||
protected function checkPath($path)
|
||||
{
|
||||
if (is_dir($path) || mkdir($path, 0755, true)) {
|
||||
if (is_dir($path)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (@mkdir($path, 0755, true)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (is_dir($path)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$this->error = ['directory {:path} creation failed', ['path' => $path]];
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user