diff options
| author | Matthias Clasen <mclasen@redhat.com> | 2011-11-29 23:07:38 -0500 |
|---|---|---|
| committer | Matthias Clasen <mclasen@redhat.com> | 2011-11-29 23:07:38 -0500 |
| commit | 726343c9b597256c523c920b39a83b66f5b5f86a (patch) | |
| tree | 1cf9348cc35efdcc7e9b11386b3a763d62a4507b | |
| parent | d1ceb834ebfaa20fcf582ab9191cc5fb9fde46f6 (diff) | |
Be more careful when resetting the users icons
When the current icon is in /usr/share, and we reset the
icon, we try to delete a nonexisting icon file in
/var/lib/AccountsService/icons. Deal with this eventuality.
| -rw-r--r-- | src/user.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1397,7 +1397,8 @@ user_change_icon_file_authorized_cb (Daemon *daemon, g_free (dest_path); error = NULL; - if (!g_file_delete (dest, NULL, &error)) { + if (!g_file_delete (dest, NULL, &error) && + !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) { g_object_unref (dest); throw_error (context, ERROR_FAILED, "failed to remove user icon, %s", error->message); g_error_free (error); |
