[HttpKernel] Show the actual directory needing to be created.

This commit is contained in:
Danny Berger 2011-10-03 02:08:17 -04:00
parent 6295e55329
commit 54196382b7

View File

@ -615,7 +615,7 @@ abstract class Kernel implements KernelInterface
foreach (array('cache' => $this->getCacheDir(), 'logs' => $this->getLogDir()) as $name => $dir) {
if (!is_dir($dir)) {
if (false === @mkdir($dir, 0777, true)) {
throw new \RuntimeException(sprintf("Unable to create the %s directory (%s)\n", $name, dirname($dir)));
throw new \RuntimeException(sprintf("Unable to create the %s directory (%s)\n", $name, $dir));
}
} elseif (!is_writable($dir)) {
throw new \RuntimeException(sprintf("Unable to write in the %s directory (%s)\n", $name, $dir));