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

Commit 3fec7e64 authored by rswindell's avatar rswindell

Remove trailing slash from sub-dir name before comparing against internal

code. Compare against full internal-code (not just suffix) for duplicate
detection.
parent 07080c13
......@@ -223,17 +223,19 @@ void prep_cfg(scfg_t* cfg)
char* tp = lastchar(p);
if(*tp != '/')
continue;
*tp = 0; // Remove trailing slash
char* dirname = getfname(p);
int j;
for(j = 0; j < cfg->total_dirs; j++) {
if(cfg->dir[j]->lib != i)
continue;
if(stricmp(cfg->dir[j]->code, dirname) == 0)
break;
if(stricmp(cfg->dir[j]->code_suffix, dirname) == 0)
break;
}
if(j < cfg->total_dirs) // duplicate
continue;
*tp = 0;
dir_t dir;
memset(&dir, 0, sizeof(dir));
dir.lib = i;
......
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