eden/src/core/file_sys
crueter badd913bee
[desktop] fix save data location, orphaned profiles finder (#2678)
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>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2678
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2025-10-07 01:32:09 +02:00
..
fsa [meta] fix license headers (#2547) 2025-09-21 21:58:59 +02:00
fssrv Address review comments 2024-02-19 19:20:46 +01:00
fssystem [file_sys] Properly fix the installation of new updates (#2651) 2025-10-02 22:48:52 +02:00
system_archive Update fmt to allow for v11 2025-04-10 01:11:22 +02:00
vfs [meta] fix license headers (#2547) 2025-09-21 21:58:59 +02:00
bis_factory.cpp User Data Migration from Citron, Sudachi, and Yuzu (#91) 2025-05-08 22:16:07 +00:00
bis_factory.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
card_image.cpp vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
card_image.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
common_funcs.h general: Convert source file copyright comments over to SPDX 2022-04-23 05:55:32 -04:00
content_archive.cpp [file_sys] Properly fix the installation of new updates (#2651) 2025-10-02 22:48:52 +02:00
content_archive.h am: use applet program loading for tested versions 2024-02-10 12:38:19 -05:00
control_metadata.cpp vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
control_metadata.h Initial 20.x control.nacp patch (#170) 2025-06-10 03:15:58 +00:00
errors.h service: bcat: Address review issues 2024-02-10 00:23:23 -06:00
fs_directory.h scope_exit: Make constexpr 2024-02-19 16:00:46 +01:00
fs_file.h Address review comments and fix compilation problems 2024-01-25 16:43:53 -05:00
fs_filesystem.h Address review comments pt. 2 2024-02-19 19:22:51 +01:00
fs_memory_management.h fs: Add FileSystemAccessor classes 2024-02-19 19:20:40 +01:00
fs_operate_range.h Address review comments and fix compilation problems 2024-01-25 16:43:53 -05:00
fs_path.h fs: Add FileSystemAccessor classes 2024-02-19 19:20:40 +01:00
fs_path_utility.h [meta] fix license headers (#2547) 2025-09-21 21:58:59 +02:00
fs_save_data_types.h Update fmt to allow for v11 2025-04-10 01:11:22 +02:00
fs_string_util.h fs: Add FileSystemAccessor classes 2024-02-19 19:20:40 +01:00
fsmitm_romfsbuild.cpp vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
fsmitm_romfsbuild.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
ips_layer.cpp [cheats] Check for comments in patch line loop (#156) 2025-07-31 16:55:14 +02:00
ips_layer.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
kernel_executable.cpp vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
kernel_executable.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
nca_metadata.cpp [meta] fix license headers (#2547) 2025-09-21 21:58:59 +02:00
nca_metadata.h fixing crashes when installing updates 2025-06-15 15:29:52 +03:00
partition_filesystem.cpp Port changes from Early Access 2025-04-04 03:40:46 +02:00
partition_filesystem.h Port changes from Early Access 2025-04-04 03:40:46 +02:00
patch_manager.cpp vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
patch_manager.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
program_metadata.cpp [fmt] use {:#X} for format instead of 0x{:X} (#309) 2025-08-27 22:39:11 +02:00
program_metadata.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
registered_cache.cpp [meta] fix license headers (#2547) 2025-09-21 21:58:59 +02:00
registered_cache.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
romfs.cpp [meta] fix license headers (#2547) 2025-09-21 21:58:59 +02:00
romfs.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
romfs_factory.cpp file_sys: handle null romfs 2023-12-01 23:39:48 -05:00
romfs_factory.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
savedata_factory.cpp [desktop] fix save data location, orphaned profiles finder (#2678) 2025-10-07 01:32:09 +02:00
savedata_factory.h fs: Add and use fs_save_data_types.h 2024-02-19 19:06:31 +01:00
sdmc_factory.cpp vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
sdmc_factory.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
submission_package.cpp core: Add support for loading NSPs with personalized tickets. (#10048) 2023-09-05 21:09:42 +02:00
submission_package.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
xts_archive.cpp [cmake, core] refactor: update mbedtls and make YUZU_USE_CPM better (#485) 2025-09-15 04:22:15 +02:00
xts_archive.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00