From 60db08b5e068880313ee8f5e1e9bfcdef439d7d0 Mon Sep 17 00:00:00 2001 From: liuyuanpeng <857491149@qq.com> Date: Mon, 1 Jul 2024 16:32:59 +0800 Subject: [PATCH] Do not delete the shared-data-dir of user root --- src/shared-data-manager.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/shared-data-manager.c b/src/shared-data-manager.c index 50a9d014f..2e6413ad3 100644 --- a/src/shared-data-manager.c +++ b/src/shared-data-manager.c @@ -157,6 +157,10 @@ next_user_dirs_cb (GObject *object, GAsyncResult *res, gpointer user_data) CommonUser *user = link->data; g_hash_table_remove (priv->starting_dirs, common_user_get_name (user)); } + if(g_hash_table_contains(priv->starting_dirs,"root")) + { + g_hash_table_remove (priv->starting_dirs,"root"); + } g_hash_table_foreach (priv->starting_dirs, delete_unused_user, manager); g_hash_table_destroy (priv->starting_dirs); priv->starting_dirs = NULL;