From 1d7ec570fa990208e59e7776f775d77c8c6cfaa1 Mon Sep 17 00:00:00 2001 From: wiidev Date: Sun, 1 Jan 2023 17:00:28 +0000 Subject: [PATCH] Create the Nintendont directory if it's missing --- source/settings/menus/FeatureSettingsMenu.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/settings/menus/FeatureSettingsMenu.cpp b/source/settings/menus/FeatureSettingsMenu.cpp index 0a0a8980..b0b36584 100644 --- a/source/settings/menus/FeatureSettingsMenu.cpp +++ b/source/settings/menus/FeatureSettingsMenu.cpp @@ -661,8 +661,10 @@ int FeatureSettingsMenu::GetMenuInternal() } else { + // Create the directory if it doesn't exist + CreateSubfolder(Settings.NINLoaderPath); // Rename existing boot.dol file to boot.bak - if(CheckFile(NINUpdatePath)) + if (CheckFile(NINUpdatePath)) RenameFile(NINUpdatePath, NINUpdatePathBak); if (DownloadFileToPath("https://raw.githubusercontent.com/FIX94/Nintendont/master/loader/loader.dol", NINUpdatePath) > 0) @@ -677,7 +679,7 @@ int FeatureSettingsMenu::GetMenuInternal() { // Restore backup file if found RemoveFile(NINUpdatePath); - if(CheckFile(NINUpdatePathBak)) + if (CheckFile(NINUpdatePathBak)) RenameFile(NINUpdatePathBak, NINUpdatePath); WindowPrompt(tr("Update Failed"), 0, tr("OK")); }