Skip to content

Commit b3c1ce5

Browse files
committed
fixed possible race condition when creating a directory
1 parent 13878f3 commit b3c1ce5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde
666666

667667
if ('file' === $config['cache']) {
668668
$cacheDir = $container->getParameterBag()->resolveValue($config['file_cache_dir']);
669-
if (!is_dir($cacheDir) && false === @mkdir($cacheDir, 0777, true)) {
669+
if (!is_dir($cacheDir) && false === @mkdir($cacheDir, 0777, true) && !is_dir($cacheDir)) {
670670
throw new \RuntimeException(sprintf('Could not create cache directory "%s".', $cacheDir));
671671
}
672672

0 commit comments

Comments
 (0)