From: Kalle Wallin Date: Mon, 22 Mar 2004 12:39:56 +0000 (+0000) Subject: Convert the directory name in file_get_header() from utf-8. X-Git-Tag: v0.12_alpha1~680 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=471e8f4e0a677c680db961d1bbd432b2a9ce1de9;p=ncmpc.git Convert the directory name in file_get_header() from utf-8. git-svn-id: https://svn.musicpd.org/ncmpc/trunk@362 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- diff --git a/screen_file.c b/screen_file.c index 34c4669..086290f 100644 --- a/screen_file.c +++ b/screen_file.c @@ -247,11 +247,14 @@ char * file_get_header(mpd_client_t *c) { static char buf[64]; + char *tmp; + tmp = utf8_to_locale(basename(c->cwd)); snprintf(buf, 64, TOP_HEADER_FILE ": %s ", - basename(c->cwd) + tmp ); + free(tmp); return buf; }