From 92c95ff022b5691ae418c40d612d2d27f955078d Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 4 Jul 2015 06:11:30 +0200 Subject: [PATCH] Also check on existence. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../io/class_FrameworkFileInputOutputPointer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php b/inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php index a86a8d3a..08ac7811 100644 --- a/inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php +++ b/inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php @@ -54,7 +54,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP } elseif ((!BaseFrameworkSystem::isReadableFile($fileName)) && (file_exists($fileName))) { // File exists but cannot be read throw new FileReadProtectedException($fileName, self::EXCEPTION_FILE_CANNOT_BE_READ); - } elseif (!is_writable($fileName)) { + } elseif ((file_exists($fileName)) && (!is_writable($fileName))) { // File exists but cannot be written throw new FileWriteProtectedException($fileName, self::EXCEPTION_FILE_CANNOT_BE_WRITTEN); } -- 2.30.2