Code

Convert the directory name in file_get_header() from utf-8.
authorKalle Wallin <kaw@linux.se>
Mon, 22 Mar 2004 12:39:56 +0000 (12:39 +0000)
committerKalle Wallin <kaw@linux.se>
Mon, 22 Mar 2004 12:39:56 +0000 (12:39 +0000)
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@362 09075e82-0dd4-0310-85a5-a0d7c8717e4f

screen_file.c

index 34c4669de30ef87dad0691892cc3ba82e67e7976..086290f745ef9c92e9da5afaf4db131ab74e9c85 100644 (file)
@@ -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;
 }