diff options
| author | crueter <crueter@eden-emu.dev> | 2025-10-07 01:32:09 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2025-10-07 01:32:09 +0200 |
| commit | badd913bee87bde630e1e4d4c6182b027ed0830f (patch) | |
| tree | faeaea63ce74ad19571fe2755139b75b7ca73244 /src/core/file_sys/savedata_factory.cpp | |
| parent | 6a4fa11ac3ad837caac5f6c305641f57fe4ecf73 (diff) | |
[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>
Diffstat (limited to 'src/core/file_sys/savedata_factory.cpp')
| -rw-r--r-- | src/core/file_sys/savedata_factory.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp index edf51e74de..dda8d526d3 100644 --- a/src/core/file_sys/savedata_factory.cpp +++ b/src/core/file_sys/savedata_factory.cpp @@ -4,7 +4,6 @@ // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include <memory> #include "common/assert.h" #include "common/common_types.h" #include "common/logging/log.h" @@ -129,10 +128,6 @@ std::string SaveDataFactory::GetFullPath(ProgramId program_id, VirtualDir dir, std::string out = GetSaveDataSpaceIdPath(space); - LOG_INFO(Common_Filesystem, "Save ID: {:016X}", save_id); - LOG_INFO(Common_Filesystem, "User ID[1]: {:016X}", user_id[1]); - LOG_INFO(Common_Filesystem, "User ID[0]: {:016X}", user_id[0]); - switch (type) { case SaveDataType::System: return fmt::format("{}save/{:016X}/{:016X}{:016X}", out, save_id, user_id[1], user_id[0]); |
