mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Lots of logging and cleanup.
This commit is contained in:
@@ -89,12 +89,19 @@ std::shared_ptr<Request> RequestManager::StartDownload(std::string_view url, con
|
||||
// to modify the calling code.
|
||||
std::string contents;
|
||||
if (File::ReadBinaryFileToString(cacheFile, &contents)) {
|
||||
INFO_LOG(Log::sceNet, "Returning cached file for %.*s: %s", (int)url.size(), url.data(), cacheFile.c_str());
|
||||
// All is well, but we've indented a bit much here.
|
||||
dl.reset(new CachedRequest(RequestMethod::GET, url, "", nullptr, flags, contents));
|
||||
newDownloads_.push_back(dl);
|
||||
return dl;
|
||||
} else {
|
||||
INFO_LOG(Log::sceNet, "Failed reading from cache, proceeding with request");
|
||||
}
|
||||
} else {
|
||||
INFO_LOG(Log::sceNet, "Cached file too old, proceeding with request");
|
||||
}
|
||||
} else {
|
||||
INFO_LOG(Log::sceNet, "Failed to check time modified. Proceeding with request.");
|
||||
}
|
||||
|
||||
// OK, didn't get it from cache, so let's continue with the download, putting it in the cache.
|
||||
|
||||
Reference in New Issue
Block a user