summaryrefslogtreecommitdiff
path: root/gdbus/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdbus/object.c')
-rw-r--r--gdbus/object.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdbus/object.c b/gdbus/object.c
index 2823054b..31869218 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -307,7 +307,11 @@ static void invalidate_parent_data(DBusConnection *conn, const char *child_path)
if (!slash)
goto done;
- *slash = '\0';
+ if (slash == parent_path && parent_path[1] != '\0')
+ parent_path[1] = '\0';
+ else
+ *slash = '\0';
+
if (!strlen(parent_path))
goto done;