Android: Fix running plain PRXs on scoped storage. Minor cleanup.

This commit is contained in:
Henrik Rydgård
2024-01-18 00:22:51 +01:00
parent 8b5f9328fb
commit ff12ff1345
2 changed files with 4 additions and 6 deletions
+3 -5
View File
@@ -262,16 +262,14 @@ bool DirectoryFileHandle::Open(const Path &basePath, std::string &fileName, File
return false;
}
fullName = GetLocalPath(basePath, fileName);
const char *fullNameC = fullName.c_str();
DEBUG_LOG(FILESYS, "Case may have been incorrect, second try opening %s (%s)", fullNameC, fileName.c_str());
DEBUG_LOG(FILESYS, "Case may have been incorrect, second try opening %s (%s)", fullName.c_str(), fileName.c_str());
// And try again with the correct case this time
#ifdef _WIN32
hFile = CreateFile(fullNameC, desired, sharemode, 0, openmode, 0, 0);
hFile = CreateFile(fullName.c_str(), desired, sharemode, 0, openmode, 0, 0);
success = hFile != INVALID_HANDLE_VALUE;
#else
hFile = open(fullNameC, flags, 0666);
hFile = open(fullName.c_str(), flags, 0666);
success = hFile != -1;
#endif
}