Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to DiscIO::CompressFileToBlob and DecompressBlobToFile #2155

Merged
merged 1 commit into from Mar 19, 2015

Conversation

mickdermack
Copy link
Contributor

This PR fixes some issues with CompressFileToBlob and DecompressBlobToFile.

Previously, failed writes were ignored and processing continued and showed success to the user instead of aborting with an error message (Issue 7867).
If deflateInit failed (highly unlikely), DiscScrubber::Cleanup wasn't called leading to a memory leak.

The functions now delete the output file if processing fails.
Moved the DiscScrubber setup code below the code for opening files.
Removed now unnecessary label.

File::IOFile inf(infile, "rb");
if (!inf)
{
PanicAlertT("Failed to open the input file %s.", infile.c_str());

This comment was marked as off-topic.

@mickdermack
Copy link
Contributor Author

Changed it. Thanks for the feedback.

@BhaaLseN
Copy link
Member

BhaaLseN commented Mar 1, 2015

Other than that, I don't see any immediate issues code-wise (haven't tried it tho).

@skidau
Copy link
Contributor

skidau commented Mar 17, 2015

@mickdermack would you please rebase this PR?

@mickdermack
Copy link
Contributor Author

@skidau Done.

@skidau
Copy link
Contributor

skidau commented Mar 18, 2015

@dolphin-emu-bot rebuild

skidau added a commit that referenced this pull request Mar 19, 2015
Improvements to DiscIO::CompressFileToBlob and DecompressBlobToFile
@skidau skidau merged commit 4b11aea into dolphin-emu:master Mar 19, 2015
@mickdermack mickdermack deleted the pr-compress branch July 6, 2015 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants