Skip to content

Commit 1e1d9eb

Browse files
author
lichangze
committed
feat: add fallback for get login.keyring path
1 parent de351c5 commit 1e1d9eb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

secret_service/secret_service.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,13 @@ func (s *SecretService) GetCollection(name string) dbus.BusObject {
9797
func (s *SecretService) GetLoginCollection() dbus.BusObject {
9898
path := dbus.ObjectPath(collectionBasePath + "login")
9999
if err := s.CheckCollectionPath(path); err != nil {
100-
path = dbus.ObjectPath(loginCollectionAlias)
100+
var loginAlias dbus.ObjectPath
101+
err := s.object.Call(serviceInterface+".ReadAlias", 0, "login").Store(&loginAlias)
102+
if err != nil || loginAlias == "/" {
103+
path = dbus.ObjectPath(loginCollectionAlias)
104+
} else {
105+
path = loginAlias
106+
}
101107
}
102108
return s.Object(serviceName, path)
103109
}

0 commit comments

Comments
 (0)