diff --git a/src/PageUtils/PageScreenshot.php b/src/PageUtils/PageScreenshot.php index a633a57f..f0a8e723 100644 --- a/src/PageUtils/PageScreenshot.php +++ b/src/PageUtils/PageScreenshot.php @@ -71,7 +71,7 @@ public function saveToFile(string $path, int $timeout = 5000) // create directory $dir = dirname($path); if (!file_exists($dir)) { - if (!mkdir($path, 0777, true)) { + if (!mkdir($dir, 0777, true)) { throw new FilesystemException( sprintf('Could not create the directory %s.', $dir) );