From fb5449cf1f75aa0f93c0484d590abca04f977d7a Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sat, 18 Jan 2025 19:29:15 -0500 Subject: [PATCH] Remove poorly placed "verifyEntryDoesNotExist" check, as clients should be responsible for performing this check long before attempting to write the entry --- core/utilitiesMisc.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/core/utilitiesMisc.go b/core/utilitiesMisc.go index ff9004e..a59ff7f 100644 --- a/core/utilitiesMisc.go +++ b/core/utilitiesMisc.go @@ -39,15 +39,7 @@ func TargetIsFile(targetLocation string, errorOnFail bool, failCondition uint8) } // WriteEntry writes entryData to an encrypted file at targetLocation. -func WriteEntry(targetLocation string, entryData []string, verifyEntryDoesNotExist bool) { - if verifyEntryDoesNotExist { - _, isAccessible := TargetIsFile(targetLocation, false, 0) - if isAccessible { - fmt.Println(AnsiError + "Target location already exists" + AnsiReset) - os.Exit(ErrorTargetExists) - } - } - +func WriteEntry(targetLocation string, entryData []string) { encryptedBytes := EncryptGPG(entryData) err := os.WriteFile(targetLocation, encryptedBytes, 0600) if err != nil {