mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-28 00:33:34 +01:00
Change Copy, Rename to use Path. Remove std::string version of Exists().
Buildfixes Buildfix
This commit is contained in:
1 parent
0d80362c30
commit
ae06499a0c
24 files changed
+176
-128
No files matched your search
+6
-6
@@ -458,16 +458,16 @@ namespace SaveState
|
||||
|
||||
static void RenameIfExists(const Path &from, const Path &to) {
|
||||
if (File::Exists(from)) {
|
||||
File::Rename(from.ToString(), to.ToString());
|
||||
File::Rename(from, to);
|
||||
}
|
||||
}
|
||||
|
||||
static void SwapIfExists(const Path &from, const Path &to) {
|
||||
std::string temp = from.ToString() + ".tmp";
|
||||
Path temp = from.WithExtraExtension("tmp");
|
||||
if (File::Exists(from)) {
|
||||
File::Rename(from.ToString(), temp);
|
||||
File::Rename(to.ToString(), from.ToString());
|
||||
File::Rename(temp, to.ToString());
|
||||
File::Rename(from, temp);
|
||||
File::Rename(to, from);
|
||||
File::Rename(temp, to);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -486,7 +486,7 @@ namespace SaveState
|
||||
} else {
|
||||
DeleteIfExists(fn);
|
||||
}
|
||||
File::Rename(fn.WithExtraExtension("tmp").ToString(), fn.ToString());
|
||||
File::Rename(fn.WithExtraExtension("tmp"), fn);
|
||||
}
|
||||
if (callback) {
|
||||
callback(status, message, data);
|
||||
|
||||
Reference in new issue
Block a user