diff --git a/src/Rotation.php b/src/Rotation.php index 5f1e2b5..7b6525b 100644 --- a/src/Rotation.php +++ b/src/Rotation.php @@ -181,7 +181,7 @@ private function sucessfull(string $filenameSource, ?string $filenameRotated): v */ private function canRotate(string $filename): bool { - if (!is_file($filename)) { + if (!file_exists($filename)) { return false; } @@ -209,7 +209,7 @@ private function initProcessorFile(string $filename): void */ private function fileIsValid(string $filename): bool { - return is_writable($filename); + return is_file($filename) && is_writable($filename); } /**