[at-spi2-core/gnome-41: 10/14] Bus launcher: ensure that at-spi directory can be created before using
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core/gnome-41: 10/14] Bus launcher: ensure that at-spi directory can be created before using
- Date: Sat, 17 Sep 2022 13:52:23 +0000 (UTC)
commit 9f3ebb630da0c5a7acbf4354a3ce65b8c7fe5b6f
Author: Mike Gorse <mgorse suse com>
Date: Wed Feb 16 17:11:08 2022 -0600
Bus launcher: ensure that at-spi directory can be created before using
Related to https://gitlab.gnome.org/GNOME/at-spi2-core/issues/43
bus/at-spi-bus-launcher.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c
index 7c6c8035..b8d9f0d2 100644
--- a/bus/at-spi-bus-launcher.c
+++ b/bus/at-spi-bus-launcher.c
@@ -523,17 +523,21 @@ ensure_a11y_bus (A11yBusLauncher *app)
g_free (at_spi_dir);
at_spi_dir = new_dir;
}
- mkdir (at_spi_dir, 0700);
- app->socket_name = g_strconcat (at_spi_dir, "/bus", display, NULL);
- g_free (at_spi_dir);
- p = strchr (app->socket_name, ':');
- if (p)
- *p = '_';
- if (strlen (app->socket_name) >= 100)
+ if (mkdir (at_spi_dir, 0700) == 0 || errno == EEXIST)
{
- g_free (app->socket_name);
- app->socket_name = NULL;
+ app->socket_name = g_strconcat (at_spi_dir, "/bus", display, NULL);
+ g_free (at_spi_dir);
+ p = strchr (app->socket_name, ':');
+ if (p)
+ *p = '_';
+ if (strlen (app->socket_name) >= 100)
+ {
+ g_free (app->socket_name);
+ app->socket_name = NULL;
+ }
}
+ else
+ g_free (at_spi_dir);
}
#ifdef WANT_DBUS_BROKER
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]