Commit 12bace27 authored by Cosimo Cecchi's avatar Cosimo Cecchi

shell-global: don't warn when unsetting non-existent state

If the state we're trying to delete does not exist, do not log an
error.
Prevents this journal warning at startup:

gnome-shell[1082]: Could not delete runtime/persistent state file: Error removing file /run/user/1000/gnome-shell/runtime-state-LE.:0/screenShield.locked: No such file or directory

!555
parent 2c45b541
Pipeline #84653 passed with stages
in 4 minutes and 14 seconds
......@@ -1560,7 +1560,8 @@ delete_variant_cb (GObject *object,
if (!g_file_delete_finish (G_FILE (object), result, &error))
{
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED) &&
!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
{
g_warning ("Could not delete runtime/persistent state file: %s\n",
error->message);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment