mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-10-26 21:19:56 -04:00
Port to latest libmutton development version
This commit is contained in:
1 parent
499c9cdd40
commit
9ee2f7ae0f
4 files changed
+17
-16
No files matched your search
@@ -78,16 +78,14 @@ fieldLoop:
|
||||
|
||||
// EntryReaderDecrypt is a wrapper for EntryReader that first decrypts an RCW-wrapped file before sending it to EntryReader.
|
||||
func EntryReaderDecrypt(targetLocation string, hideSecrets bool) {
|
||||
isFile, _, err := back.TargetIsFile(targetLocation, true, 2)
|
||||
if err != nil {
|
||||
_, err := back.TargetIsFile(targetLocation, true)
|
||||
if err != nil { // if the location does not exist or is a directory...
|
||||
other.PrintError("Failed to verify target location: "+err.Error(), back.ErrorTargetNotFound, true)
|
||||
}
|
||||
if isFile {
|
||||
decBytes, err := crypt.DecryptFileToSlice(targetLocation)
|
||||
if err != nil {
|
||||
other.PrintError("Failed to decrypt entry: "+err.Error(), global.ErrorDecryption, true)
|
||||
}
|
||||
EntryReader(decBytes, hideSecrets, false) // never sync if decrypting straight to EntryReader, as this means the entry could not have been modified
|
||||
decBytes, err := crypt.DecryptFileToSlice(targetLocation)
|
||||
if err != nil {
|
||||
other.PrintError("Failed to decrypt entry: "+err.Error(), global.ErrorDecryption, true)
|
||||
}
|
||||
EntryReader(decBytes, hideSecrets, false) // never sync if decrypting straight to EntryReader, as this means the entry could not have been modified
|
||||
// do not exit, as this is the job of EntryReader
|
||||
}
|
||||
Reference in new issue
Block a user