From 1916a775d1afc7a1c409c607864005b73e6ed372 Mon Sep 17 00:00:00 2001
From: Philippe Daouadi
Date: Wed, 25 Jul 2018 20:54:17 +0200
Subject: [PATCH] pkgi: prevent comp pack installation if game is not installed
---
src/pkgi.cpp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/pkgi.cpp b/src/pkgi.cpp
index f3972029..37b7c81b 100644
--- a/src/pkgi.cpp
+++ b/src/pkgi.cpp
@@ -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)
{
@@ -587,7 +593,7 @@ 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;
}
@@ -595,7 +601,7 @@ static void pkgi_do_main(Downloader& downloader, pkgi_input* input)
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;
}