Sync with latest libmutton development version

This commit is contained in:
2026-01-21 19:12:13 -05:00
parent 0211941a48
commit 8f9aa7eef3
7 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -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
View File
@@ -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)
}
+1 -1
View File
@@ -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)
}
+1 -1
View File
@@ -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