diff options
-rw-r--r-- | src/platforms/posix/posixFile.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/platforms/posix/posixFile.cpp b/src/platforms/posix/posixFile.cpp index b814b758..ec529eb6 100644 --- a/src/platforms/posix/posixFile.cpp +++ b/src/platforms/posix/posixFile.cpp @@ -306,6 +306,9 @@ bool posixFile::isFile() const if (::stat(m_nativePath.c_str(), &buf) == -1) { + if (errno == ENOENT) + return false; + posixFileSystemFactory::reportError(m_path, errno); return false; } @@ -320,6 +323,9 @@ bool posixFile::isDirectory() const if (::stat(m_nativePath.c_str(), &buf) == -1) { + if (errno == ENOENT) + return false; + posixFileSystemFactory::reportError(m_path, errno); return false; } @@ -334,6 +340,9 @@ bool posixFile::canRead() const if (::stat(m_nativePath.c_str(), &buf) == -1) { + if (errno == ENOENT) + return false; + posixFileSystemFactory::reportError(m_path, errno); return false; } @@ -349,6 +358,9 @@ bool posixFile::canWrite() const if (::stat(m_nativePath.c_str(), &buf) == -1) { + if (errno == ENOENT) + return false; + posixFileSystemFactory::reportError(m_path, errno); return false; } |