From 2f1b2c6adf9521f4943924d4b686be639a72501d Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 25 Oct 2019 11:07:50 +0200 Subject: [PATCH] Create necessary folder when using Redump.org integration This was making it impossible to use the Redump.org integration without first manually creating a Redump folder in the Cache folder. https://bugs.dolphin-emu.org/issues/11885 --- Source/Core/DiscIO/VolumeVerifier.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp index e62e40eff7..663976ce19 100644 --- a/Source/Core/DiscIO/VolumeVerifier.cpp +++ b/Source/Core/DiscIO/VolumeVerifier.cpp @@ -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; }