fs::rename fixed

Added overwriting policy
sys_fs_rename improved
This commit is contained in:
Nekotekina 2017-08-30 17:14:30 +03:00
parent da3f3fd1fb
commit 010b75251f
5 changed files with 44 additions and 8 deletions

View file

@ -376,7 +376,7 @@ void Emulator::Load(bool add_only)
LOG_ERROR(LOADER, "Disc game %s found at invalid location /dev_hdd0/game/", m_title_id);
// Move and retry from correct location
if (fs::rename(elf_dir + "/../../", hdd0_disc + elf_dir.substr(hdd0_game.size()) + "/../../"))
if (fs::rename(elf_dir + "/../../", hdd0_disc + elf_dir.substr(hdd0_game.size()) + "/../../", false))
{
LOG_SUCCESS(LOADER, "Disc game %s moved to special location /dev_hdd0/disc/", m_title_id);
return SetPath(hdd0_disc + m_path.substr(hdd0_game.size())), Load();