Delete encrypted file post download
This commit is contained in:
parent
c2e624d919
commit
fda7fe02a9
1 changed files with 2 additions and 0 deletions
|
@ -37,6 +37,8 @@ func (c *ClICtrl) downloadAndDecrypt(
|
|||
if err != nil {
|
||||
log.Printf("Error decrypting file %d: %s", file.ID, err)
|
||||
return nil, model.ErrDecryption
|
||||
} else {
|
||||
_ = os.Remove(downloadPath)
|
||||
}
|
||||
return &decryptedPath, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue