Create new channel for every decryption

This commit is contained in:
Xpl0itU 2023-07-23 13:05:59 +02:00
parent 8e69ec1cea
commit 49a2c9169c

View file

@ -23,10 +23,11 @@ func callProgressCallback(progress C.int) {
progressChan <- int(progress)
}
var progressChan = make(chan int)
var progressChan chan int
func DecryptContents(path string, progress *ProgressWindow, deleteEncryptedContents bool) error {
errorChan := make(chan error)
progressChan = make(chan int)
defer close(errorChan)
go runDecryption(path, errorChan, deleteEncryptedContents)