mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-26 07:43:36 +01:00
Simplify FileUtil::Exists. Minor cleanups.
Might possibly help #7967 (XP) by avoiding _wstat64? That would be a libc bug though.
This commit is contained in:
1 parent
7e70a743ca
commit
0084b2ac30
2 files changed
+26
-55
No files matched your search
+4
-4
@@ -593,16 +593,16 @@ void InitSysDirectories() {
|
||||
g_Config.memStickDirectory = myDocsPath;
|
||||
}
|
||||
|
||||
const std::string testFile = "/_writable_test.$$$";
|
||||
const std::string testFile = g_Config.memStickDirectory + "/_writable_test.$$$";
|
||||
|
||||
// If any directory is read-only, fall back to the Documents directory.
|
||||
// We're screwed anyway if we can't write to Documents, or can't detect it.
|
||||
if (!File::CreateEmptyFile(g_Config.memStickDirectory + testFile))
|
||||
if (!File::CreateEmptyFile(testFile))
|
||||
g_Config.memStickDirectory = myDocsPath;
|
||||
|
||||
// Clean up our mess.
|
||||
if (File::Exists(g_Config.memStickDirectory + testFile))
|
||||
File::Delete(g_Config.memStickDirectory + testFile);
|
||||
if (File::Exists(testFile))
|
||||
File::Delete(testFile);
|
||||
|
||||
if (g_Config.currentDirectory.empty()) {
|
||||
g_Config.currentDirectory = GetSysDirectory(DIRECTORY_GAME);
|
||||
|
||||
Reference in new issue
Block a user