Act as if unreadable files don't exist.

This mainly affects Linux.  If a file cannot be opened for reading, we
should just return false for Exists(), since that will prevent us from
trying to read from the file later.
This commit is contained in:
Unknown W. Brackets 2015-03-12 19:58:09 -07:00
parent dad8f5cd25
commit 3ce582f8a7

View File

@ -237,9 +237,13 @@ LocalFileLoader::~LocalFileLoader() {
}
bool LocalFileLoader::Exists() {
// If we couldn't open it for reading, we say it does not exist.
if (f_) {
FileInfo info;
return getFileInfo(filename_.c_str(), &info);
}
return false;
}
bool LocalFileLoader::IsDirectory() {
FileInfo info;