Skip to content

Commit 1f7f879

Browse files
committed
throws exception when is unable to create temp directory
1 parent ca33f9f commit 1f7f879

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/RobotLoader/RobotLoader.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,7 @@ public function setAutoRefresh($on = true)
357357
public function setTempDirectory($dir)
358358
{
359359
if ($dir) {
360-
if (!is_dir($dir)) {
361-
@mkdir($dir); // @ - directory may already exist
362-
}
360+
Nette\Utils\FileSystem::createDir($dir);
363361
$this->cacheStorage = new Nette\Caching\Storages\FileStorage($dir);
364362
} else {
365363
$this->cacheStorage = new Nette\Caching\Storages\DevNullStorage;

0 commit comments

Comments
 (0)