Skip to content

Commit

Permalink
feat: add fallback for get login.keyring path
Browse files Browse the repository at this point in the history
  • Loading branch information
lichangze committed Aug 23, 2024
1 parent de351c5 commit 1e1d9eb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion secret_service/secret_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@ func (s *SecretService) GetCollection(name string) dbus.BusObject {
func (s *SecretService) GetLoginCollection() dbus.BusObject {
path := dbus.ObjectPath(collectionBasePath + "login")
if err := s.CheckCollectionPath(path); err != nil {
path = dbus.ObjectPath(loginCollectionAlias)
var loginAlias dbus.ObjectPath
err := s.object.Call(serviceInterface+".ReadAlias", 0, "login").Store(&loginAlias)
if err != nil || loginAlias == "/" {
path = dbus.ObjectPath(loginCollectionAlias)
} else {
path = loginAlias
}
}
return s.Object(serviceName, path)
}
Expand Down

0 comments on commit 1e1d9eb

Please sign in to comment.