mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-27 20:36:29 -04:00
Initial password aging support
This commit is contained in:
+4
-4
@@ -13,15 +13,15 @@ import (
|
||||
|
||||
// CopyShortcut, given a path, decrypts an
|
||||
// entry and copies a field to the clipboard.
|
||||
func CopyShortcut(targetLocation string, field int) error {
|
||||
// ensure targetLocation exists and is a file
|
||||
_, err := back.TargetIsFile(targetLocation, true)
|
||||
func CopyShortcut(realPath string, field int) error {
|
||||
// ensure realPath exists and is a file
|
||||
_, err := back.TargetIsFile(realPath, true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// decrypt entry
|
||||
decSlice, err := crypt.DecryptFileToSlice(targetLocation)
|
||||
decSlice, err := crypt.DecryptFileToSlice(realPath)
|
||||
if err != nil {
|
||||
return errors.New("unable to decrypt entry: " + err.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user