Improve code

This commit is contained in:
Xpl0itU 2023-08-26 16:19:21 +02:00
parent 4176b1b168
commit 954d92e932
4 changed files with 14 additions and 19 deletions

View file

@ -14,7 +14,7 @@ extern void callProgressCallback(int progress);
*/
import "C"
import (
"fmt"
"errors"
"time"
"unsafe"
@ -74,7 +74,7 @@ func runDecryption(path string, deleteEncryptedContents bool) error {
C.set_progress_callback(C.ProgressCallback(C.callProgressCallback))
if int(C.cdecrypt_main(2, (**C.char)(unsafe.Pointer(&argv[0])))) != 0 {
return fmt.Errorf("decryption failed")
return errors.New("decryption failed")
}
if deleteEncryptedContents {