Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, for more info) to build successfully.

Commit ca62daf9 authored by rswindell's avatar rswindell

When the LIB_DIRS option is enabled (auto-add sub-directories of teh parent

directory), ignore dirs that are already configured, i.e. internal code
suffix matches the sub-dir name.
parent 7ab20765
......@@ -223,6 +223,16 @@ void prep_cfg(scfg_t* cfg)
char* tp = lastchar(p);
if(*tp != '/')
char* dirname = getfname(p);
int j;
for(j = 0; j < cfg->total_dirs; j++) {
if(cfg->dir[j]->lib != i)
if(stricmp(cfg->dir[j]->code_suffix, dirname) == 0)
if(j < cfg->total_dirs) // duplicate
*tp = 0;
dir_t dir;
memset(&dir, 0, sizeof(dir));
......@@ -230,7 +240,7 @@ void prep_cfg(scfg_t* cfg)
dir.misc = DIR_FILES;
SAFECOPY(dir.path, p);
SAFECOPY(dir.lname, getfname(p));
SAFECOPY(dir.lname, dirname);
SAFECOPY(dir.sname, dir.lname);
char code_suffix[LEN_EXTCODE+1];
SAFECOPY(code_suffix, dir.lname);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment