From 7366191f0d0d5c50ee051a3b60fc31ad86bce721 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 15 Oct 2008 19:36:33 +0200 Subject: mapper: moved musicDir initialization from path.c Moved the musicDir variable and its initialization code from path.c to mapper.c. --- src/path.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src/path.c') diff --git a/src/path.c b/src/path.c index 2a78870c0..159d923da 100644 --- a/src/path.c +++ b/src/path.c @@ -33,9 +33,7 @@ #include -const char *musicDir; static const char *playlistDir; -static size_t music_dir_len; static size_t playlist_dir_len; static char *fsCharset; @@ -100,7 +98,6 @@ const char *getFsCharset(void) void initPaths(void) { - ConfigParam *musicParam = parseConfigFilePath(CONF_MUSIC_DIR, 1); ConfigParam *playlistParam = parseConfigFilePath(CONF_PLAYLIST_DIR, 1); ConfigParam *fsCharsetParam = getConfigParam(CONF_FS_CHARSET); @@ -108,10 +105,7 @@ void initPaths(void) char *originalLocale; DIR *dir; - musicDir = xstrdup(musicParam->value); playlistDir = xstrdup(playlistParam->value); - - music_dir_len = strlen(musicDir); playlist_dir_len = strlen(playlistDir); if ((dir = opendir(playlistDir)) == NULL) { @@ -121,13 +115,6 @@ void initPaths(void) } else closedir(dir); - if ((dir = opendir(musicDir)) == NULL) { - ERROR("cannot open %s \"%s\" (config line %i): %s\n", - CONF_MUSIC_DIR, musicParam->value, - musicParam->line, strerror(errno)); - } else - closedir(dir); - if (fsCharsetParam) { charset = xstrdup(fsCharsetParam->value); } @@ -195,13 +182,6 @@ char *pfx_dir(char *dst, return (dst + pfx_len + 1); } -char *rmp2amp_r(char *dst, const char *rel_path) -{ - pfx_dir(dst, rel_path, strlen(rel_path), - (const char *)musicDir, music_dir_len); - return dst; -} - char *rpp2app_r(char *dst, const char *rel_path) { pfx_dir(dst, rel_path, strlen(rel_path), -- cgit v1.2.3