[desktop] fix save data location, orphaned profiles finder #2678

Merged
crueter merged 2 commits from fix/profiles into master 2025-10-07 01:32:10 +02:00
Owner

Previously, if the user had their NAND in a nonstandard location,
profiles.dat would be read from the standard Eden path and thus return
effectively garbage data. What this would result in is:

  • The Qt profile manager would be completely nonfunctional
  • "Open Save Data Location" would put you into the completely wrong
    place
  • Games would read from incorrect locations for their saves

To solve this, I made it so that profiles.dat is re-read after
QtConfig initializes. It's not the perfect solution, but it works.

Additionally, this adds an orphaned profiles finder:

  • walks through the save folders in nand/user/save/000.../
  • for each subdirectory, checks to see if profiles.dat contains a
    corresponding UUID
  • If not, the profile is "orphaned". It may contain legit save data, so
    let the user decide how to handle it (famous last words)
  • Empty profiles are just removed. If they really matter, they're
    instantly recreated anyways.

The orphaned profiles check runs right after the decryption keys
check, but before the game list ever gets populated

Signed-off-by: crueter crueter@eden-emu.dev

Previously, if the user had their NAND in a nonstandard location, profiles.dat would be read from the standard Eden path and thus return effectively garbage data. What this would result in is: - The Qt profile manager would be completely nonfunctional - "Open Save Data Location" would put you into the completely wrong place - Games would read from incorrect locations for their saves To solve this, I made it so that profiles.dat is re-read *after* QtConfig initializes. It's not the perfect solution, but it works. Additionally, this adds an orphaned profiles finder: - walks through the save folders in nand/user/save/000.../ - for each subdirectory, checks to see if profiles.dat contains a corresponding UUID - If not, the profile is "orphaned". It may contain legit save data, so let the user decide how to handle it (famous last words) - Empty profiles are just removed. If they really matter, they're instantly recreated anyways. The orphaned profiles check runs right *after* the decryption keys check, but before the game list ever gets populated Signed-off-by: crueter <crueter@eden-emu.dev>
crueter added 1 commit 2025-10-05 23:52:21 +02:00
[desktop] fix save data location, orphaned profiles finder
All checks were successful
eden-license / license-header (pull_request) Successful in 23s
33b7f39f65
Previously, if the user had their NAND in a nonstandard location,
profiles.dat would be read from the standard Eden path and thus return
effectively garbage data. What this would result in is:

- The Qt profile manager would be completely nonfunctional
- "Open Save Data Location" would put you into the completely wrong
  place
- Games would read from incorrect locations for their saves

To solve this, I made it so that profiles.dat is re-read *after*
QtConfig initializes. It's not the perfect solution, but it works.

Additionally, this adds an orphaned profiles finder:
- walks through the save folders in nand/user/save/000.../
- for each subdirectory, checks to see if profiles.dat contains a
  corresponding UUID
- If not, the profile is "orphaned". It may contain legit save data, so
  let the user decide how to handle it (famous last words)
- Empty profiles are just removed. If they really matter, they're
  instantly recreated anyways.

The orphaned profiles check runs right *after* the decryption keys
check, but before the game list ever gets populated

Signed-off-by: crueter <crueter@eden-emu.dev>
requested reviews from CamilleLaVey, Maufeat, MrPurple666, MaranBr, Lizzie 2025-10-05 23:52:21 +02:00
crueter added 1 commit 2025-10-06 00:21:56 +02:00
oops
All checks were successful
eden-license / license-header (pull_request) Successful in 25s
9076fa25fa
Signed-off-by: crueter <crueter@eden-emu.dev>
CamilleLaVey approved these changes 2025-10-06 18:21:30 +02:00
MaranBr approved these changes 2025-10-06 18:22:34 +02:00
crueter merged commit badd913bee into master 2025-10-07 01:32:10 +02:00
crueter deleted branch fix/profiles 2025-10-07 01:32:10 +02:00
Sign in to join this conversation.
No description provided.