Skip to content

Commit

Permalink
pkgi: prevent comp pack installation if game is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
blastrock committed Jul 25, 2018
1 parent f2b5a7f commit 1916a77
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/pkgi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ static void pkgi_start_download_comppack(Downloader& downloader)
return;
}

if (item->presence != PresenceInstalled)
{
LOGF("{} is not installed", item->content);
return;
}

const auto entry = comppack_db->get(item->titleid);
if (!entry)
{
Expand Down Expand Up @@ -587,15 +593,15 @@ static void pkgi_do_main(Downloader& downloader, pkgi_input* input)
case ModePspGames:
if (item->presence == PresenceInstalled)
{
LOGF("[{}] {} - alreay installed", item->titleid, item->name);
LOGF("[{}] {} - already installed", item->titleid, item->name);
pkgi_dialog_error("Already installed");
return;
}
break;
case ModeDlcs:
if (item->presence == PresenceInstalled)
{
LOGF("[{}] {} - alreay installed", item->content, item->name);
LOGF("[{}] {} - already installed", item->content, item->name);
pkgi_dialog_error("Already installed");
return;
}
Expand Down

0 comments on commit 1916a77

Please sign in to comment.