diff options
author | Max Kellermann <max@duempel.org> | 2009-12-08 08:17:35 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-12-08 08:33:14 +0100 |
commit | f4b707b4ca6451fcb1a6af6d3f2e58579b3c01a5 (patch) | |
tree | 253d945d1a2f996844e480d80916c75975882afe /src/playlist_save.c | |
parent | cd69fee0a46e6b64ea9c76ccb83e601e098f3e07 (diff) | |
download | mpd-f4b707b4ca6451fcb1a6af6d3f2e58579b3c01a5.tar.gz mpd-f4b707b4ca6451fcb1a6af6d3f2e58579b3c01a5.tar.xz mpd-f4b707b4ca6451fcb1a6af6d3f2e58579b3c01a5.zip |
mapper: apply filesystem_charset to playlists
This fixes an inconsistency in the stored playlist subsystem: when
obtaining the list of playlists (listplaylist, listplaylistinfo), the
file names in the playlist directory are converted to UTF-8 (according
to filesystem_charset), but when saving or loading playlists, the
filesystem_charset setting was ignored.
Diffstat (limited to '')
-rw-r--r-- | src/playlist_save.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/playlist_save.c b/src/playlist_save.c index 776d3c385..13dbc721d 100644 --- a/src/playlist_save.c +++ b/src/playlist_save.c @@ -71,12 +71,15 @@ spl_save_queue(const char *name_utf8, const struct queue *queue) char *path_fs; FILE *file; + if (map_spl_path() == NULL) + return PLAYLIST_RESULT_DISABLED; + if (!spl_valid_name(name_utf8)) return PLAYLIST_RESULT_BAD_NAME; path_fs = map_spl_utf8_to_fs(name_utf8); if (path_fs == NULL) - return PLAYLIST_RESULT_DISABLED; + return PLAYLIST_RESULT_BAD_NAME; if (g_file_test(path_fs, G_FILE_TEST_EXISTS)) { g_free(path_fs); |