From b541bfee56699a028ff708e1f2d8fe92d9cfe2b0 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 26 May 2015 23:20:25 +0200 Subject: [PATCH] If the file doesn't exist as it has to be created first, then this exception would always be thrown, so for a "random access file", this is bad news. 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 edf9f572..a86a8d3a 100644 --- a/inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php +++ b/inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php @@ -51,7 +51,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP } elseif (!BaseFrameworkSystem::isReachableFilePath($fileName)) { // File exists but cannot be read throw new FileIoException($fileName, self::EXCEPTION_FILE_NOT_REACHABLE); - } elseif (!BaseFrameworkSystem::isReadableFile($fileName)) { + } 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)) { -- 2.30.2