From: Max Kellermann Date: Thu, 1 Oct 2009 21:31:43 +0000 (+0200) Subject: screen_play: check the result of mpd_connection_clear_error() X-Git-Tag: release-0.16~229 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0babcc4ec3b92a6396bbfe7fcc59c60808788798;p=ncmpc.git screen_play: check the result of mpd_connection_clear_error() --- 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));