From 0babcc4ec3b92a6396bbfe7fcc59c60808788798 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 1 Oct 2009 23:31:43 +0200 Subject: [PATCH] screen_play: check the result of mpd_connection_clear_error() --- src/screen_play.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/screen_play.c b/src/screen_play.c index aee7e60..79479bb 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -327,12 +327,11 @@ playlist_save(struct mpdclient *c, char *name, char *defaultname) if (!mpd_run_save(c->connection, filename_utf8)) { if (mpd_connection_get_error(c->connection) == MPD_ERROR_SERVER && - mpd_connection_get_server_error(c->connection) == MPD_SERVER_ERROR_EXIST) { + mpd_connection_get_server_error(c->connection) == MPD_SERVER_ERROR_EXIST && + mpd_connection_clear_error(c->connection)) { char *buf; int key; - mpd_connection_clear_error(c->connection); - buf = g_strdup_printf(_("Replace %s [%s/%s] ? "), filename, YES, NO); key = tolower(screen_getch(buf)); -- 2.30.2