Merge pull request #8429 from JosJuice/redump-create-path

Create necessary folder when using Redump.org integration
This commit is contained in:
Mat M
2019-10-26 15:51:25 -04:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@ -153,7 +153,9 @@ RedumpVerifier::DownloadStatus RedumpVerifier::DownloadDatfile(const std::string
return system_not_available_match ? DownloadStatus::SystemNotAvailable : DownloadStatus::Fail;
}
File::IOFile(output_path, "wb").WriteBytes(result->data(), result->size());
File::CreateFullPath(output_path);
if (!File::IOFile(output_path, "wb").WriteBytes(result->data(), result->size()))
ERROR_LOG(DISCIO, "Failed to write downloaded datfile to %s", output_path.c_str());
return DownloadStatus::Success;
}