Greatly reduce code duplication in clipboard implementations

This commit is contained in:
2024-03-03 23:26:39 -05:00
parent e822bd89dc
commit b09a1c8132
+1 -3
View File
@@ -65,9 +65,7 @@ func EntryReader(decryptedEntry []string, hidePassword bool) {
} }
func EntryReaderShortcut(targetLocation string, hidePassword bool) { func EntryReaderShortcut(targetLocation string, hidePassword bool) {
if isFile, _ := offline.TargetIsFile(targetLocation, true); isFile { if isFile, _ := offline.TargetIsFile(targetLocation, true, 2); isFile {
EntryReader(offline.DecryptGPG(targetLocation), hidePassword) EntryReader(offline.DecryptGPG(targetLocation), hidePassword)
} else {
fmt.Println(offline.AnsiError + "Failed to read \"" + targetLocation + "\" - it is a directory" + offline.AnsiReset)
} }
} }