aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-04-13 04:59:57 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-04-13 04:59:57 +0000
commit1004890e253453faba81126028986f075e5fc5e7 (patch)
tree053e319b9c64d0b4a47bd61311007f01150109a7 /src/playlist.c
parent0927c61533d410ffce6c34f279e1280edab0fbd6 (diff)
downloadmpd-1004890e253453faba81126028986f075e5fc5e7.tar.gz
mpd-1004890e253453faba81126028986f075e5fc5e7.tar.xz
mpd-1004890e253453faba81126028986f075e5fc5e7.zip
lots of fsCharset, utf8/ascii converting clean-up and robustness stuff
Also, if fsCharsetToUtf8 can't convert to valid UTF-8, then don't add it to the db, this way clients don't have to worry about weirdness and it will force ppl to convert it. git-svn-id: https://svn.musicpd.org/mpd/trunk@711 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/playlist.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/playlist.c b/src/playlist.c
index 471c1b08e..cf064047f 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -1122,7 +1122,9 @@ int loadPlaylist(FILE * fp, char * utf8file) {
free(temp);
}
slength = 0;
- temp = strdup(fsCharsetToUtf8(s));
+ temp = fsCharsetToUtf8(s);
+ if(!temp) continue;
+ temp = strdup(temp);
if(s[0]==PLAYLIST_COMMENT && !getSong(temp)) {
free(temp);
continue;