The entire path is now included in the debug log output if a scraped file or folder is not in the root of the game directory

This commit is contained in:
Leon Styhre 2023-08-04 17:54:02 +02:00
parent 8aa09fe9f5
commit 47a790ccff
2 changed files with 11 additions and 4 deletions

View file

@ -53,7 +53,16 @@ std::unique_ptr<ScraperSearchHandle> startScraperSearch(const ScraperSearchParam
LOG(LogDebug) << "Scraper::startScraperSearch(): Scraping system \""
<< params.system->getName()
<< (params.game->getType() == FOLDER ? "\", folder \"" : "\", game file \"")
<< params.game->getFileName() << "\"";
#if defined(_WIN64)
<< Utils::String::replace(
params.game->getPath().substr(
params.game->getSystemEnvData()->mStartPath.length() + 1),
"/", "\\")
#else
<< params.game->getPath().substr(
params.game->getSystemEnvData()->mStartPath.length() + 1)
#endif
<< "\"";
scraper_request_funcs.at(name)(params, handle->mRequestQueue, handle->mResults);
}
@ -103,7 +112,7 @@ void ScraperSearchHandle::update()
// A request can add more requests to the queue while running,
// so be careful with references into the queue.
auto& req = *(mRequestQueue.front());
AsyncHandleStatus status = req.status();
AsyncHandleStatus status {req.status()};
if (status == ASYNC_ERROR) {
// Propagate error.

View file

@ -108,8 +108,6 @@ class ScraperRequest : public AsyncHandle
{
public:
ScraperRequest(std::vector<ScraperSearchResult>& resultsWrite);
// Returns "true" once we're done.
virtual void update() = 0;
protected: