Workaround for missing Type property

Some poor decisions that have been made made by KeePassXC lead to the case where they diverge from libsecret's implementation and implement their own incompatible API in the same Dbus namespace.

But they still call their API "Secret Service".

 Well then.
This commit is contained in:
2022-01-09 00:56:56 -05:00
parent bb85cb8b52
commit b4419a6f8c
3 changed files with 20 additions and 2 deletions

View File

@@ -80,7 +80,9 @@ func (c *Collection) CreateItem(label string, attrs map[string]string, secret *S
}
props[DbusItemLabel] = dbus.MakeVariant(label)
props[DbusItemType] = dbus.MakeVariant(typeString)
if !c.service.Legacy {
props[DbusItemType] = dbus.MakeVariant(typeString)
}
props[DbusItemAttributes] = dbus.MakeVariant(attrs)
props[DbusItemCreated] = dbus.MakeVariant(uint64(time.Now().Unix()))
// props[DbusItemModified] = dbus.MakeVariant(uint64(time.Now().Unix()))