From c17097369b28572cb9b9523879b5107be9fb125f Mon Sep 17 00:00:00 2001 From: MythicalPlayz <57963367+MythicalPlayz@users.noreply.github.com> Date: Sun, 20 Nov 2022 18:21:20 +0200 Subject: [PATCH] Redownload BOSS files if they are not found (#504) --- src/Cafe/IOSU/legacy/iosu_boss.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Cafe/IOSU/legacy/iosu_boss.cpp b/src/Cafe/IOSU/legacy/iosu_boss.cpp index acf8a99d..e28ef2c4 100644 --- a/src/Cafe/IOSU/legacy/iosu_boss.cpp +++ b/src/Cafe/IOSU/legacy/iosu_boss.cpp @@ -284,7 +284,7 @@ namespace iosu else if (starts_with(ptr, "Content-Type: ")) { const char* type = &ptr[14]; - if (starts_with(type, "application/xml")) + if (starts_with(type, "application/xml") || starts_with(type, "text/xml")) task->content_type = ContentType::kXmlContent; else if (starts_with(type, "x-application/octet-stream")) task->content_type = ContentType::kBinaryFile; @@ -685,7 +685,8 @@ namespace iosu } auto currentEntry = boss_storage_fad_find_entry(fad_content, file.data_id); - if(currentEntry) + //TODO deep dive into IOSU to figure out how caching actually works on th Wii U + if(currentEntry && fs::exists(path / fmt::format(L"{:08x}", file.data_id))) { uint64 timestamp = (uint64)currentEntry->timestampRelated + kTimeStampConvertSeconds; curl_easy_setopt(curl, CURLOPT_TIMEVALUE, timestamp);