Skip to content

Commit

Permalink
Decryption improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Xpl0itU committed Aug 24, 2023
1 parent 38e6be5 commit 9500945
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions decryption.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
}

0 comments on commit 9500945

Please sign in to comment.