diff --git a/src/TemporaryFilesManager.php b/src/TemporaryFilesManager.php index b35616ea..6726d3b4 100644 --- a/src/TemporaryFilesManager.php +++ b/src/TemporaryFilesManager.php @@ -27,6 +27,9 @@ public function generateTemporaryFilePath(string $fileIdentifier): string public function deleteAllTemporaryFiles(string $fileIdentifier): void { + if (!$this->filesystem->exists($this->temporaryDirectory)) { + return; + } $tempFiles = $this->finder->in($this->temporaryDirectory)->depth('== 0')->files()->name( '/^' . str_replace('*', '\*', $this->getFilePrefix($fileIdentifier)) . '[\w]+$/', );