8000 [Bridge] Fix mkdir() race condition in ProxyCacheWarmer · symfony/symfony@cdb6c15 · GitHub
[go: up one dir, main page]

Skip to content

Commit cdb6c15

Browse files
committed
[Bridge] Fix mkdir() race condition in ProxyCacheWarmer
1 parent b96f1c4 commit cdb6c15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function warmUp($cacheDir)
4949
foreach ($this->registry->getManagers() as $em) {
5050
// we need the directory no matter the proxy cache generation strategy
5151
if (!is_dir($proxyCacheDir = $em->getConfiguration()->getProxyDir())) {
52-
if (false === @mkdir($proxyCacheDir, 0777, true)) {
52+
if (false === @mkdir($proxyCacheDir, 0777, true) && !is_dir($proxyCacheDir)) {
5353
throw new \RuntimeException(sprintf('Unable to create the Doctrine Proxy directory "%s".', $proxyCacheDir));
5454
}
5555
} elseif (!is_writable($proxyCacheDir)) {

0 commit comments

Comments
 (0)
0