Skip to content
Permalink
Browse files

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

Create necessary folder when using Redump.org integration
  • Loading branch information...
lioncash committed Oct 26, 2019
2 parents cc6a119 + 2210a0a commit 427d4501bc9bd9b1c1c43f6213765be3e9fcb73c
Showing with 4 additions and 1 deletion.
  1. +1 −0 Source/Core/Common/FileUtil.cpp
  2. +3 −1 Source/Core/DiscIO/VolumeVerifier.cpp
@@ -824,6 +824,7 @@ static void RebuildUserDirectories(unsigned int dir_index)

case D_CACHE_IDX:
s_user_paths[D_COVERCACHE_IDX] = s_user_paths[D_CACHE_IDX] + COVERCACHE_DIR DIR_SEP;
s_user_paths[D_REDUMPCACHE_IDX] = s_user_paths[D_CACHE_IDX] + REDUMPCACHE_DIR DIR_SEP;
s_user_paths[D_SHADERCACHE_IDX] = s_user_paths[D_CACHE_IDX] + SHADERCACHE_DIR DIR_SEP;
break;

@@ -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;
}

0 comments on commit 427d450

Please sign in to comment.
You can’t perform that action at this time.