[totem/wip/hadess/no-pl-delete-warning] main: Don't throw warning when deleting state playlist
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/wip/hadess/no-pl-delete-warning] main: Don't throw warning when deleting state playlist
- Date: Mon, 30 Mar 2020 11:09:59 +0000 (UTC)
commit bfdd162b997067d6c62bf8528f206e47aaeacc8f
Author: Bastien Nocera <hadess hadess net>
Date: Mon Mar 30 13:05:01 2020 +0200
main: Don't throw warning when deleting state playlist
Don't throw a warning if the playlist that keeps the current state is
not present on disk.
src/totem-playlist.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/totem-playlist.c b/src/totem-playlist.c
index 92453fd23..3b5c49e5f 100644
--- a/src/totem-playlist.c
+++ b/src/totem-playlist.c
@@ -338,8 +338,11 @@ totem_playlist_delete_session_playlist_cb (GObject *source_object,
gboolean ret;
ret = g_file_delete_finish (G_FILE (source_object), res, &error);
- if (!ret && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ if (!ret) {
+ 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 ("Failed to delete session playlist: %s", error->message);
+ }
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]