diff options
author | Max Kellermann <max@duempel.org> | 2008-10-31 16:47:14 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-31 16:47:14 +0100 |
commit | d8e877e3355d0858c78a6d9a7060a6683024dd30 (patch) | |
tree | cdc996fa583c1f996da6ff18500b7cf360e182e1 /src/path.c | |
parent | ef542716196b90b71480ee952db64c3df736a12e (diff) | |
download | mpd-d8e877e3355d0858c78a6d9a7060a6683024dd30.tar.gz mpd-d8e877e3355d0858c78a6d9a7060a6683024dd30.tar.xz mpd-d8e877e3355d0858c78a6d9a7060a6683024dd30.zip |
path: moved playlist_dir to mapper.c
Added the function map_spl_utf8_to_fs() which replaces
utf8_to_fs_playlist_path().
Diffstat (limited to '')
-rw-r--r-- | src/path.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/path.c b/src/path.c index 0494a0985..62a2362b5 100644 --- a/src/path.c +++ b/src/path.c @@ -32,8 +32,6 @@ #include <glib.h> -static const char *playlistDir; -static size_t playlist_dir_len; static char *fsCharset; char *fs_charset_to_utf8(char *dst, const char *str) @@ -99,22 +97,10 @@ const char *getFsCharset(void) void initPaths(void) { - ConfigParam *playlistParam = parseConfigFilePath(CONF_PLAYLIST_DIR, 1); ConfigParam *fsCharsetParam = getConfigParam(CONF_FS_CHARSET); char *charset = NULL; char *originalLocale; - DIR *dir; - - playlistDir = xstrdup(playlistParam->value); - playlist_dir_len = strlen(playlistDir); - - if ((dir = opendir(playlistDir)) == NULL) { - ERROR("cannot open %s \"%s\" (config line %i): %s\n", - CONF_PLAYLIST_DIR, playlistParam->value, - playlistParam->line, strerror(errno)); - } else - closedir(dir); if (fsCharsetParam) { charset = xstrdup(fsCharsetParam->value); @@ -183,13 +169,6 @@ char *pfx_dir(char *dst, return (dst + pfx_len + 1); } -char *rpp2app_r(char *dst, const char *rel_path) -{ - pfx_dir(dst, rel_path, strlen(rel_path), - (const char *)playlistDir, playlist_dir_len); - return dst; -} - char *sanitizePathDup(const char *path) { int len = strlen(path) + 1; @@ -229,10 +208,3 @@ char *sanitizePathDup(const char *path) return xrealloc(ret, len + 1); } - -void utf8_to_fs_playlist_path(char *path_max_tmp, const char *utf8path) -{ - utf8_to_fs_charset(path_max_tmp, utf8path); - rpp2app_r(path_max_tmp, path_max_tmp); - strncat(path_max_tmp, "." PLAYLIST_FILE_SUFFIX, MPD_PATH_MAX - 1); -} |