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.
This commit is contained in:
Léo Lam 2017-06-22 23:41:01 +02:00
parent e30484e8a7
commit a3fdda1675
1 changed files with 4 additions and 2 deletions

View File

@ -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;