From 7bf58713eafd015816d3b9354ccc4d7516ce59ae Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 20 Oct 2013 13:27:13 -0500 Subject: [PATCH] Work around errors in cache stuff. --- src/Illuminate/Cache/FileStore.php | 2 +- src/Illuminate/Filesystem/Filesystem.php | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Illuminate/Cache/FileStore.php b/src/Illuminate/Cache/FileStore.php index 6d6060c121e2..2fa15f86f552 100755 --- a/src/Illuminate/Cache/FileStore.php +++ b/src/Illuminate/Cache/FileStore.php @@ -96,7 +96,7 @@ protected function createCacheDirectory($path) { try { - $this->files->makeDirectory(dirname($path), 0777, true); + $this->files->makeDirectory(dirname($path), 0777, true, true); } catch (\Exception $e) { diff --git a/src/Illuminate/Filesystem/Filesystem.php b/src/Illuminate/Filesystem/Filesystem.php index f385b65b9ca2..32a7a5f218b1 100755 --- a/src/Illuminate/Filesystem/Filesystem.php +++ b/src/Illuminate/Filesystem/Filesystem.php @@ -289,11 +289,19 @@ public function directories($directory) * @param string $path * @param int $mode * @param bool $recursive + * @param bool $force * @return bool */ - public function makeDirectory($path, $mode = 0777, $recursive = false) + public function makeDirectory($path, $mode = 0777, $recursive = false, $force = false) { - return mkdir($path, $mode, $recursive); + if ($force) + { + return @mkdir($path, $mode, $recursive); + } + else + { + return mkdir($path, $mode, $recursive); + } } /**