From: Max Kellermann Date: Sat, 17 Oct 2009 22:30:42 +0000 (+0200) Subject: screen_browser: convert path only for the message X-Git-Tag: release-0.16~96 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=78ccd8ae40d1379d19dec5dbf5a6e85d21cb1b31;p=ncmpc.git screen_browser: convert path only for the message We don't need the locale path if we don't print a message. --- diff --git a/src/screen_browser.c b/src/screen_browser.c index 455053c..8802e5f 100644 --- a/src/screen_browser.c +++ b/src/screen_browser.c @@ -122,16 +122,17 @@ static bool load_playlist(struct mpdclient *c, const struct mpd_playlist *playlist) { struct mpd_connection *connection = mpdclient_get_connection(c); - char *filename = utf8_to_locale(mpd_playlist_get_path(playlist)); if (mpd_run_load(connection, mpd_playlist_get_path(playlist))) { + char *filename = utf8_to_locale(mpd_playlist_get_path(playlist)); screen_status_printf(_("Loading playlist %s..."), g_basename(filename)); + g_free(filename); + c->events |= MPD_IDLE_QUEUE; } else mpdclient_handle_error(c); - g_free(filename); return true; }