aboutsummaryrefslogtreecommitdiffstats
path: root/src/path.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-15 19:36:33 +0200
committerMax Kellermann <max@duempel.org>2008-10-15 19:36:33 +0200
commit7366191f0d0d5c50ee051a3b60fc31ad86bce721 (patch)
tree5b9d9280d0d93fe6779719e2796e790e1f95eb8c /src/path.c
parent76779f0fbe195d4334fdd56d0f36630a4eca5240 (diff)
downloadmpd-7366191f0d0d5c50ee051a3b60fc31ad86bce721.tar.gz
mpd-7366191f0d0d5c50ee051a3b60fc31ad86bce721.tar.xz
mpd-7366191f0d0d5c50ee051a3b60fc31ad86bce721.zip
mapper: moved musicDir initialization from path.c
Moved the musicDir variable and its initialization code from path.c to mapper.c.
Diffstat (limited to 'src/path.c')
-rw-r--r--src/path.c20
1 files changed, 0 insertions, 20 deletions
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 <glib.h>
-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),