diff --git a/src/RobotLoader/RobotLoader.php b/src/RobotLoader/RobotLoader.php index d214e07..938760c 100644 --- a/src/RobotLoader/RobotLoader.php +++ b/src/RobotLoader/RobotLoader.php @@ -397,6 +397,9 @@ public function setAutoRefresh(bool $on = true): static */ public function setTempDirectory(string $dir): static { + if (!FileSystem::isAbsolute($dir)) { + throw new Nette\InvalidArgumentException("Temporary directory must be absolute, '$dir' given."); + } FileSystem::createDir($dir); $this->tempDirectory = $dir; return $this;