escape unallowed chars before opening/saving file with lyrics

This commit is contained in:
Andrzej Rybczak
2009-02-02 12:02:09 +01:00
parent 6217bf04c2
commit baa1c9bf4f

View File

@@ -309,7 +309,9 @@ void *GetLyrics(void *song)
locale_to_utf(artist);
locale_to_utf(title);
const string fullpath = lyrics_folder + "/" + artist + " - " + title + ".txt";
string filename = artist + " - " + title + ".txt";
EscapeUnallowedChars(filename);
const string fullpath = lyrics_folder + "/" + filename;
mkdir(lyrics_folder.c_str(), 0755);