mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-08-28 04:46:41 -04:00
Sync with latest libmutton development version
This commit is contained in:
+1
-1
@@ -26,7 +26,7 @@ func CopyMenu(vanityPath string, decSlice []string, oldPassword string) {
|
||||
var err error
|
||||
if decSlice == nil {
|
||||
// decrypt entry
|
||||
decSlice, err = crypt.DecryptFileToSlice(realPath)
|
||||
decSlice, err = crypt.DecryptFileToSlice(realPath, nil)
|
||||
if err != nil {
|
||||
other.PrintError("Failed to decrypt entry: "+err.Error(), global.ErrorDecryption)
|
||||
}
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@ func RenameCli(oldVanityPath string) {
|
||||
// EditEntryField edits a field of an entry at realPath (user input).
|
||||
func EditEntryField(realPath string, field int) {
|
||||
// fetch old entry data (with all required lines present)
|
||||
decSlice, err := core.GetOldEntryData(realPath, field)
|
||||
decSlice, err := core.GetOldEntryData(realPath, field, nil)
|
||||
if err != nil {
|
||||
other.PrintError("Failed to fetch entry data: "+err.Error(), back.ErrorRead)
|
||||
}
|
||||
@@ -69,7 +69,7 @@ func EditEntryField(realPath string, field int) {
|
||||
// GenUpdate generates a new password for an entry at realPath (user input).
|
||||
func GenUpdate(realPath string) {
|
||||
// fetch old entry data
|
||||
decSlice, err := core.GetOldEntryData(realPath, 0)
|
||||
decSlice, err := core.GetOldEntryData(realPath, 0, nil)
|
||||
if err != nil {
|
||||
other.PrintError("Failed to fetch entry data: "+err.Error(), back.ErrorRead)
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ func EntryReaderDecrypt(realPath string, hideSecrets bool) {
|
||||
if err != nil { // if the location does not exist or is a directory...
|
||||
other.PrintError("Failed to verify target location: "+err.Error(), back.ErrorTargetNotFound)
|
||||
}
|
||||
decSlice, err := crypt.DecryptFileToSlice(realPath)
|
||||
decSlice, err := crypt.DecryptFileToSlice(realPath, nil)
|
||||
if err != nil {
|
||||
other.PrintError("Failed to decrypt entry: "+err.Error(), global.ErrorDecryption)
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ func inputPasswordGen() string {
|
||||
// writeEntryCLI writes an entry to realPath and previews it (errors if no data is supplied).
|
||||
func writeEntryCLI(realPath string, decSlice []string, passwordIsNew bool, oldPassword string) {
|
||||
if core.EntryIsNotEmpty(decSlice) {
|
||||
if err := core.WriteEntry(realPath, decSlice, passwordIsNew); err != nil {
|
||||
if err := core.WriteEntry(realPath, decSlice, passwordIsNew, nil); err != nil {
|
||||
other.PrintError("Failed to write entry: "+err.Error(), back.ErrorWrite)
|
||||
}
|
||||
// preview the entry
|
||||
|
||||
Reference in New Issue
Block a user