mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-26 11:45:26 +00:00
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:
parent
dad8f5cd25
commit
3ce582f8a7
@ -237,8 +237,12 @@ LocalFileLoader::~LocalFileLoader() {
|
||||
}
|
||||
|
||||
bool LocalFileLoader::Exists() {
|
||||
FileInfo info;
|
||||
return getFileInfo(filename_.c_str(), &info);
|
||||
// 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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user