X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Famindex.c;h=7c52bd380564043709666ffa4f51a23dbc93f03c;hb=79cdc4b6ea8848b21ba4a0e7d2fd3bc401e0bebe;hp=6e50fe5a1b369c0fd13e550cc94bbe12500e808d;hpb=34197d9f46a5f4e944378cbb65fca32ee0eec7b9;p=debian%2Famanda diff --git a/server-src/amindex.c b/server-src/amindex.c index 6e50fe5..7c52bd3 100644 --- a/server-src/amindex.c +++ b/server-src/amindex.c @@ -25,7 +25,7 @@ * University of Maryland at College Park */ /* - * $Id: amindex.c,v 1.15.2.1 2006/11/24 18:05:05 martinea Exp $ + * $Id: amindex.c,v 1.15 2006/05/25 01:47:19 johnfranks Exp $ * * index control */ @@ -64,7 +64,7 @@ getindexfname( datebuf[SIZEOF(datebuf)-1] = '\0'; dc = datebuf; - snprintf(level_str, SIZEOF(level_str), "%d", level); + g_snprintf(level_str, SIZEOF(level_str), "%d", level); } host = sanitise_filename(host); @@ -72,12 +72,7 @@ getindexfname( disk = sanitise_filename(disk); } - conf_indexdir = getconf_str(CNF_INDEXDIR); - if (*conf_indexdir == '/') { - conf_indexdir = stralloc(conf_indexdir); - } else { - conf_indexdir = stralloc2(config_dir, conf_indexdir); - } + conf_indexdir = config_dir_relative(getconf_str(CNF_INDEXDIR)); /* * Note: vstralloc() will stop at the first NULL, which might be * "disk" or "dc" (datebuf) rather than the full file name. @@ -126,7 +121,7 @@ getoldindexfname( datebuf[SIZEOF(datebuf)-1] = '\0'; dc = datebuf; - snprintf(level_str, SIZEOF(level_str), "%d", level); + g_snprintf(level_str, SIZEOF(level_str), "%d", level); } host = old_sanitise_filename(host); @@ -134,12 +129,7 @@ getoldindexfname( disk = old_sanitise_filename(disk); } - conf_indexdir = getconf_str(CNF_INDEXDIR); - if (*conf_indexdir == '/') { - conf_indexdir = stralloc(conf_indexdir); - } else { - conf_indexdir = stralloc2(config_dir, conf_indexdir); - } + conf_indexdir = config_dir_relative(getconf_str(CNF_INDEXDIR)); /* * Note: vstralloc() will stop at the first NULL, which might be * "disk" or "dc" (datebuf) rather than the full file name.