From 75480fa3fb44a2637c768d530d0c44645b5eca17 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 4 Jan 2018 00:26:07 +0100 Subject: [PATCH] Continued: - first check path, then file MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../io/class_FrameworkFileInputOutputPointer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php b/framework/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php index 556942db..971b3aca 100644 --- a/framework/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php +++ b/framework/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php @@ -67,12 +67,12 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP } elseif ((!FrameworkBootstrap::isReadableFile($fileInstance)) && (file_exists($fileInstance))) { // File exists but cannot be read throw new FileReadProtectedException($fileInstance, self::EXCEPTION_FILE_CANNOT_BE_READ); - } elseif (($fileInstance->isFile()) && (!$fileInstance->isWritable())) { - // File exists but cannot be written - throw new FileWriteProtectedException($fileInstance, self::EXCEPTION_FILE_CANNOT_BE_WRITTEN); } elseif (!is_writable($fileInstance->getPath())) { // Path is not writable throw new PathWriteProtectedException($fileInstance, self::EXCEPTION_PATH_CANNOT_BE_WRITTEN); + } elseif (($fileInstance->isFile()) && (!$fileInstance->isWritable())) { + // File exists but cannot be written + throw new FileWriteProtectedException($fileInstance, self::EXCEPTION_FILE_CANNOT_BE_WRITTEN); } // Try to open a handler -- 2.30.2