2 Commits

Author SHA1 Message Date
5b3328f2b9 fix Item.Label; it was not updating Item.LabelName. 2021-12-14 04:36:53 -05:00
16e972c148 typo 2021-12-13 05:50:05 -05:00
2 changed files with 6 additions and 5 deletions

View File

@@ -118,7 +118,7 @@ func pathsFromPath(bus dbus.BusObject, path string) (paths []dbus.ObjectPath, er
/*
NameFromPath returns an actual name (as it appears in Dbus) from a dbus.ObjectPath.
Note that you can get any object's dbus.ObjectPath via <object.Dbus.Path().
Note that you can get any object's dbus.ObjectPath via <object>.Dbus.Path().
path is validated to ensure it is not an empty string.
*/
func NameFromPath(path dbus.ObjectPath) (name string, err error) {

View File

@@ -1,11 +1,11 @@
package gosecret
import (
`strconv`
`strings`
`time`
"strconv"
"strings"
"time"
`github.com/godbus/dbus/v5`
"github.com/godbus/dbus/v5"
)
// NewItem returns a pointer to an Item based on Collection and a Dbus path.
@@ -158,6 +158,7 @@ func (i *Item) Label() (label string, err error) {
}
label = variant.Value().(string)
i.LabelName = label
return
}