would always be thrown, so for a "random access file", this is bad news.
Signed-off-by: Roland Häder <roland@mxchange.org>
} elseif (!BaseFrameworkSystem::isReachableFilePath($fileName)) {
// File exists but cannot be read
throw new FileIoException($fileName, self::EXCEPTION_FILE_NOT_REACHABLE);
} 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)) {
// File exists but cannot be read
throw new FileReadProtectedException($fileName, self::EXCEPTION_FILE_CANNOT_BE_READ);
} elseif (!is_writable($fileName)) {