diff --git a/src/Illuminate/Filesystem/LockableFile.php b/src/Illuminate/Filesystem/LockableFile.php index edb801f4847b..a095d4e9a9b5 100644 --- a/src/Illuminate/Filesystem/LockableFile.php +++ b/src/Illuminate/Filesystem/LockableFile.php @@ -2,6 +2,7 @@ namespace Illuminate\Filesystem; +use Exception; use Illuminate\Contracts\Filesystem\LockTimeoutException; class LockableFile @@ -65,6 +66,10 @@ protected function ensureDirectoryExists($path) protected function createResource($path, $mode) { $this->handle = @fopen($path, $mode); + + if (! $this->handle) { + throw new Exception('Unable to create lockable file: '.$path.'. Please ensure you have permission to create files in this location.'); + } } /**