mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-10-28 05:39:58 -04:00
Greatly reduce code duplication in clipboard implementations
This commit is contained in:
1 parent
6fecf5a686
commit
24b899a83a
7 files changed
+112
-140
No files matched your search
@@ -65,9 +65,7 @@ func EntryReader(decryptedEntry []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)
|
||||
} else {
|
||||
fmt.Println(offline.AnsiError + "Failed to read \"" + targetLocation + "\" - it is a directory" + offline.AnsiReset)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user