aboutsummaryrefslogtreecommitdiffstats
path: root/src/ls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ls.c b/src/ls.c
index a47f64d74..d461109d5 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -46,6 +46,7 @@ int lsPlaylists(FILE * fp, char * utf8path) {
struct stat st;
struct dirent * ent;
char * dup;
+ char * utf8;
char s[MAXPATHLEN+1];
List * list = NULL;
ListNode * node = NULL;
@@ -78,8 +79,9 @@ int lsPlaylists(FILE * fp, char * utf8path) {
if(list==NULL) list = makeList(NULL);
dup = strdup(ent->d_name);
dup[suff] = '\0';
- insertInList(list,
- fsCharsetToUtf8(dup),NULL);
+ if((utf8 = fsCharsetToUtf8(dup))) {
+ insertInList(list,utf8,NULL);
+ }
free(dup);
}
}