From 950094561c6d1b9f4717ecae48f270def4a14604 Mon Sep 17 00:00:00 2001 From: Xpl0itU <24777100+Xpl0itU@users.noreply.github.com> Date: Thu, 24 Aug 2023 16:23:26 +0200 Subject: [PATCH] Decryption improvements --- decryption.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/decryption.go b/decryption.go index 4497117..f44977e 100644 --- a/decryption.go +++ b/decryption.go @@ -52,14 +52,11 @@ func DecryptContents(path string, progress *ProgressWindow, deleteEncryptedConte time.Sleep(time.Millisecond * 10) } - if err := <-errorChan; err != nil { - return err - } - - return nil + return <-errorChan } func runDecryption(path string, errorChan chan<- error, deleteEncryptedContents bool) { + defer close(progressChan) argv := make([]*C.char, 2) argv[0] = C.CString("WiiUDownloader") argv[1] = C.CString(path) @@ -78,6 +75,5 @@ func runDecryption(path string, errorChan chan<- error, deleteEncryptedContents doDeleteEncryptedContents(path) } - close(progressChan) // Indicate the completion of the decryption process errorChan <- nil }