diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2012-08-29 14:34:39 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2012-08-29 14:35:11 +0200 |
commit | b06e620913f0f35947a889929d185afb1a72d011 (patch) | |
tree | f9cee9df30f1d5c5c02c14a4d36ed8009742e752 /src/lyrics.cpp | |
parent | b1c301dc1ca62287180afc9d7fef7e548e120f1d (diff) |
more cleanup and grouping functions logically together
Diffstat (limited to 'src/lyrics.cpp')
-rw-r--r-- | src/lyrics.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lyrics.cpp b/src/lyrics.cpp index a55aa5f4..1e4e4f5e 100644 --- a/src/lyrics.cpp +++ b/src/lyrics.cpp @@ -20,6 +20,7 @@ #include <cassert> #include <cerrno> +#include <cstring> #include <fstream> #include "browser.h" @@ -305,7 +306,7 @@ std::string Lyrics::GenerateFilename(const MPD::Song &s) file += " - "; file += locale_to_utf_cpy(s.getTitle()); file += ".txt"; - EscapeUnallowedChars(file); + removeInvalidCharsFromFilename(file); filename = Config.lyrics_directory; filename += "/"; filename += file; @@ -402,7 +403,7 @@ void Lyrics::Refetch() if (remove(itsFilename.c_str()) && errno != ENOENT) { const char msg[] = "Couldn't remove \"%s\": %s"; - ShowMessage(msg, Shorten(TO_WSTRING(itsFilename), COLS-static_strlen(msg)-25).c_str(), strerror(errno)); + ShowMessage(msg, Shorten(TO_WSTRING(itsFilename), COLS-const_strlen(msg)-25).c_str(), strerror(errno)); return; } Load(); |