Skip to content

Commit

Permalink
App updater: download to usb0 if available
Browse files Browse the repository at this point in the history
  • Loading branch information
illusion0001 committed Aug 22, 2023
1 parent dd3519a commit 373b951
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions source/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,20 @@ void update_callback(int sel)

if (show_dialog(DIALOG_TYPE_YESNO, "New version available! Download update?"))
{
char* pkg_path = (dir_exists("/data/pkg") == SUCCESS) ? "/data/pkg/apollo-ps4.pkg" : "/data/apollo-ps4.pkg";
char* pkg_path = "/data/apollo-ps4.pkg";
if (dir_exists(USB0_PATH) == SUCCESS)
{
pkg_path = USB0_PATH "apollo-ps4.pkg";
}
else if (dir_exists("/data/pkg/") == SUCCESS)
{
pkg_path = "/data/pkg/apollo-ps4.pkg";
}

if (http_download(start, NULL, pkg_path, 1))
show_message("Update downloaded to %s", pkg_path);
else
show_message("Download error!");
show_message("Unable to download update package file!");
}

end_update:
Expand Down

0 comments on commit 373b951

Please sign in to comment.