Skip to content

Commit 1939650

Browse files
committed
minor #13645 fixed possible race condition when creating a directory (fabpot)
This PR was merged into the 2.3 branch. Discussion ---------- fixed possible race condition when creating a directory | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #13228 | License | MIT | Doc PR | n/a Commits ------- 8542866 fixed possible race condition when creating a directory
2 parents a486bf2 + b3c1ce5 commit 1939650

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)