From f4b707b4ca6451fcb1a6af6d3f2e58579b3c01a5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 8 Dec 2009 08:17:35 +0100 Subject: 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. --- src/playlist_save.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/playlist_save.c') diff --git a/src/playlist_save.c b/src/playlist_save.c index 776d3c38..13dbc721 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); -- cgit v1.2.3