Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent SD data loss from silent resync failure #12069

Merged
merged 1 commit into from Aug 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion Source/Core/Core/Core.cpp
Expand Up @@ -535,7 +535,16 @@ static void EmuThread(std::unique_ptr<BootParameters> boot, WindowSystemInfo wsi

Common::ScopeGuard sd_folder_sync_guard{[sync_sd_folder] {
if (sync_sd_folder && Config::Get(Config::MAIN_ALLOW_SD_WRITES))
Common::SyncSDImageToSDFolder([]() { return false; });
{
const bool sync_ok = Common::SyncSDImageToSDFolder([]() { return false; });
if (!sync_ok)
{
PanicAlertFmtT(
"Failed to sync SD card with folder. All changes made this session will be "
"discarded on next boot if you do not manually re-issue a resync in Config > "
"Wii > SD Card Settings > Convert File to Folder Now!");
}
}
}};

// Load Wiimotes - only if we are booting in Wii mode
Expand Down