Skip to content

Commit 373b951

Browse files
committed
App updater: download to usb0 if available
1 parent dd3519a commit 373b951

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

source/settings.c

+11-2
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,20 @@ void update_callback(int sel)
191191

192192
if (show_dialog(DIALOG_TYPE_YESNO, "New version available! Download update?"))
193193
{
194-
char* pkg_path = (dir_exists("/data/pkg") == SUCCESS) ? "/data/pkg/apollo-ps4.pkg" : "/data/apollo-ps4.pkg";
194+
char* pkg_path = "/data/apollo-ps4.pkg";
195+
if (dir_exists(USB0_PATH) == SUCCESS)
196+
{
197+
pkg_path = USB0_PATH "apollo-ps4.pkg";
198+
}
199+
else if (dir_exists("/data/pkg/") == SUCCESS)
200+
{
201+
pkg_path = "/data/pkg/apollo-ps4.pkg";
202+
}
203+
195204
if (http_download(start, NULL, pkg_path, 1))
196205
show_message("Update downloaded to %s", pkg_path);
197206
else
198-
show_message("Download error!");
207+
show_message("Unable to download update package file!");
199208
}
200209

201210
end_update:

0 commit comments

Comments
 (0)