Skip to content

Commit

Permalink
Fix update when homebrew nro is not /switch/sphaira/sphaira.nro. (#64)
Browse files Browse the repository at this point in the history
Signed-off-by: shadow2560 <[email protected]>
  • Loading branch information
shadow2560 authored Jan 12, 2025
1 parent 2e14e4b commit fd1d461
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sphaira/source/ui/menus/main_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fd1d461

Please sign in to comment.