Skip to content

Commit

Permalink
Terrible check to see if we have decrypted an EBOOT properly
Browse files Browse the repository at this point in the history
  • Loading branch information
jvyden committed Jan 19, 2024
1 parent 4890512 commit e3cdda2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Refresher/UI/IntegratedPatchForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,16 @@ protected virtual void GameChanged(object? sender, EventArgs ev)
this._tempFile = Path.GetTempFileName();

LibSceToolSharp.Decrypt(downloadedFile, this._tempFile);
// HACK: scetool doesn't give us result codes, check if the file has been written to instead
if (new FileInfo(this._tempFile).Length == 0)
{
this.FailVerify("The EBOOT failed to decrypt. Check the log for more information.");
return;
}

this.LogMessage($"The EBOOT has been successfully decrypted. It's stored at {this._tempFile}.");

this.Patcher = new EbootPatcher(File.Open(this._tempFile, FileMode.Open, FileAccess.ReadWrite));

this.Reverify(sender, ev);
}

Expand Down

0 comments on commit e3cdda2

Please sign in to comment.