mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-03 17:02:41 +00:00
NandPaths: Return paths that are relative to Wii NAND
Since all FS access will go through the new FS interface (PR #6421) in order to keep track of metadata properly, there is no need to return absolute paths anymore. In fact, returning host paths is a roadblock to using the FS interface. This starts the migration work by adding a way to get paths that are relative to the Wii NAND instead of always getting absolute paths on the host FS. To prepare for future changes, this commit also makes returned paths canonical by removing the trailing slash when it's unneeded. Eventually, once everything has been migrated to the new interface, we can remove the "from" parameter.
This commit is contained in:
parent
00de41b583
commit
8317a66ea5
11 changed files with 61 additions and 42 deletions
|
@ -36,7 +36,7 @@ static void InitializeDeterministicWiiSaves()
|
|||
else
|
||||
{
|
||||
// TODO: Check for the actual save data
|
||||
Movie::SetClearSave(!File::Exists(user_save_path + "banner.bin"));
|
||||
Movie::SetClearSave(!File::Exists(user_save_path + "/banner.bin"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ static void InitializeDeterministicWiiSaves()
|
|||
(Movie::IsMovieActive() && !Movie::IsStartingFromClearSave()))
|
||||
{
|
||||
// Copy the current user's save to the Blank NAND
|
||||
if (File::Exists(user_save_path + "banner.bin"))
|
||||
if (File::Exists(user_save_path + "/banner.bin"))
|
||||
{
|
||||
File::CopyDir(user_save_path, save_path);
|
||||
}
|
||||
|
@ -86,10 +86,10 @@ void ShutdownWiiRoot()
|
|||
std::string user_backup_path = File::GetUserPath(D_BACKUP_IDX) +
|
||||
StringFromFormat("%08x/%08x/", static_cast<u32>(title_id >> 32),
|
||||
static_cast<u32>(title_id));
|
||||
if (File::Exists(save_path + "banner.bin") && SConfig::GetInstance().bEnableMemcardSdWriting)
|
||||
if (File::Exists(save_path + "/banner.bin") && SConfig::GetInstance().bEnableMemcardSdWriting)
|
||||
{
|
||||
// Backup the existing save just in case it's still needed.
|
||||
if (File::Exists(user_save_path + "banner.bin"))
|
||||
if (File::Exists(user_save_path + "/banner.bin"))
|
||||
{
|
||||
if (File::Exists(user_backup_path))
|
||||
File::DeleteDirRecursively(user_backup_path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue