mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -06:00
Merge pull request #5911 from leoetlino/windows-files
BTBase: Fix a file deletion issue on Windows
This commit is contained in:
@ -38,6 +38,7 @@ void BackUpBTInfoSection(const SysConf* sysconf)
|
|||||||
void RestoreBTInfoSection(SysConf* sysconf)
|
void RestoreBTInfoSection(SysConf* sysconf)
|
||||||
{
|
{
|
||||||
const std::string filename = File::GetUserPath(D_CONFIG_IDX) + DIR_SEP WII_BTDINF_BACKUP;
|
const std::string filename = File::GetUserPath(D_CONFIG_IDX) + DIR_SEP WII_BTDINF_BACKUP;
|
||||||
|
{
|
||||||
File::IOFile backup(filename, "rb");
|
File::IOFile backup(filename, "rb");
|
||||||
if (!backup)
|
if (!backup)
|
||||||
return;
|
return;
|
||||||
@ -47,6 +48,7 @@ void RestoreBTInfoSection(SysConf* sysconf)
|
|||||||
ERROR_LOG(IOS_WIIMOTE, "Failed to read backed up BT.DINF section");
|
ERROR_LOG(IOS_WIIMOTE, "Failed to read backed up BT.DINF section");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
File::Delete(filename);
|
File::Delete(filename);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user