From fd1d461ea810bc3f8f3d9258be5b8a5dbad7a6da Mon Sep 17 00:00:00 2001 From: shadow2560 <24191064+shadow2560@users.noreply.github.com> Date: Mon, 13 Jan 2025 00:11:56 +0100 Subject: [PATCH] Fix update when homebrew nro is not /switch/sphaira/sphaira.nro. (#64) Signed-off-by: shadow2560 <24191064+shadow2560@users.noreply.github.com> --- sphaira/source/ui/menus/main_menu.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sphaira/source/ui/menus/main_menu.cpp b/sphaira/source/ui/menus/main_menu.cpp index e5190e2..bbd3ede 100644 --- a/sphaira/source/ui/menus/main_menu.cpp +++ b/sphaira/source/ui/menus/main_menu.cpp @@ -89,6 +89,10 @@ auto InstallUpdate(ProgressBox* pbox, const std::string url, const std::string v file_path = fs::AppendPath("/", file_path); } + if (!strcasecmp(strrchr(file_path.s, '/'), "/sphaira.nro")) { + file_path = App::GetExePath(); + } + Result rc; if (file_path[strlen(file_path) -1] == '/') { if (R_FAILED(rc = fs.CreateDirectoryRecursively(file_path)) && rc != FsError_PathAlreadyExists) {