mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-16 03:38:38 +12:00
Update System.cpp
This commit is contained in:
parent
880a4e3ca6
commit
90d6069a16
1 changed files with 6 additions and 6 deletions
|
@ -677,17 +677,17 @@ game_boot_result Emulator::BootGame(const std::string& path, const std::string&
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
old_path = old_path.substr(0, old_path.find_last_not_of(fs::delim) + 1);
|
std::string new_path = old_path.substr(0, old_path.find_last_not_of(fs::delim) + 1);
|
||||||
const usz insert_pos = old_path.find_last_of(fs::delim) + 1;
|
const usz insert_pos = new_path.find_last_of(fs::delim) + 1;
|
||||||
const auto prefix = "used_"sv;
|
const auto prefix = "used_"sv;
|
||||||
|
|
||||||
if (old_path.compare(insert_pos, prefix.size(), prefix) != 0)
|
if (new_path.compare(insert_pos, prefix.size(), prefix) != 0)
|
||||||
{
|
{
|
||||||
old_path.insert(insert_pos, prefix);
|
new_path.insert(insert_pos, prefix);
|
||||||
|
|
||||||
if (fs::rename(path, old_path, true))
|
if (fs::rename(old_path, new_path, true))
|
||||||
{
|
{
|
||||||
sys_log.notice("Savestate has been moved to path='%s'", old_path);
|
sys_log.notice("Savestate has been moved to path='%s'", new_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue