From a3fdda1675f469935883154e6dbcbe7f71a2958e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Thu, 22 Jun 2017 23:41:01 +0200 Subject: [PATCH] IOS/ES: Fix import sanity check The sanity check runs *before* finalising the import, so at that time the whole title directory is still in /import and not in /title. This means we should check for contents there, not in /title. Whoops. --- Source/Core/Core/IOS/ES/TitleManagement.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/IOS/ES/TitleManagement.cpp b/Source/Core/Core/IOS/ES/TitleManagement.cpp index 143c4a86d3..58f55b84e5 100644 --- a/Source/Core/Core/IOS/ES/TitleManagement.cpp +++ b/Source/Core/Core/IOS/ES/TitleManagement.cpp @@ -365,8 +365,10 @@ ReturnCode ES::ImportTitleDone(Context& context) if (content.IsShared()) return shared_content_map.GetFilenameFromSHA1(content.sha1).has_value(); - return File::Exists(Common::GetTitleContentPath(title_id, Common::FROM_SESSION_ROOT) + - StringFromFormat("%08x.app", content.id)); + // Note: the import hasn't been finalised yet, so the whole title directory + // is still in /import, not /title. + return File::Exists(Common::GetImportTitlePath(title_id, Common::FROM_SESSION_ROOT) + + StringFromFormat("/content/%08x.app", content.id)); }); if (!has_all_required_contents) return ES_EINVAL;