Fix erroneous key reencryption

This commit is contained in:
Elara 2020-12-04 23:51:15 -08:00
parent 7f3a95855c
commit 77b9cb8e76

View File

@ -97,7 +97,7 @@ func EncryptFiles(dir string, sharedKey string) {
// If error reading, return err // If error reading, return err
if err != nil { return err } if err != nil { return err }
// If file is not a directory and is not the key // If file is not a directory and is not the key
if !info.IsDir() && !strings.Contains(path, "aesKey"){ if !info.IsDir() && !strings.Contains(path, "key.aes"){
// Encrypt the file using shared key, appending .enc // Encrypt the file using shared key, appending .enc
EncryptFile(path, path + ".enc", sharedKey) EncryptFile(path, path + ".enc", sharedKey)
// Remove unencrypted file // Remove unencrypted file