app/dbus: set dbusAddress early

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
Ophestra Umiker 2024-09-09 03:46:46 +09:00
parent 38ef2b4d0c
commit 8e848366cd
Signed by: cat
SSH Key Fingerprint: SHA256:gQ67O0enBZ7UdZypgtspB2FDM1g3GVw8nX0XSdcFw8Q
1 changed files with 1 additions and 1 deletions

View File

@ -23,6 +23,7 @@ func (a *App) ShareDBus(c *dbus.Config) {
var binPath, address string
target := path.Join(system.V.Share, strconv.Itoa(os.Getpid()))
dbusAddress = "unix:path=" + target
if b, ok := util.Which("xdg-dbus-proxy"); !ok {
state.Fatal("D-Bus: Did not find 'xdg-dbus-proxy' in PATH")
@ -74,7 +75,6 @@ func (a *App) ShareDBus(c *dbus.Config) {
// register early to enable Fatal cleanup
state.RegisterDBus(p, &done)
dbusAddress = "unix:path=" + target
if !<-ready {
state.Fatal("D-Bus: proxy did not start correctly")