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 bf941a65 authored by rswindell's avatar rswindell

Fix issue reported by Mark Lewis:

 scfg
 validates/creates directories when you save the file area config but they are
 missing the '/' between "dirs" and the internal code...

So the Transfer File Path auto-default-value logic is actually in 3 places:
- load_cfg.c prep_cfg()
- scfgsave.c write_file_cfg()
- scfgxfr2.c dir_cfg() - for display purposes only

<sigh>
parent cd1296eb
......@@ -829,22 +829,20 @@ BOOL DLLCALL write_file_cfg(scfg_t* cfg, int backup_level)
if (cfg->dir[i]->misc&DIR_FCHK) {
SAFECOPY(path, cfg->dir[i]->path);
if (!path[0]) { /* no file storage path specified */
if(cfg->dir[i]->data_dir[0])
SAFECOPY(path, cfg->dir[i]->data_dir);
else
SAFEPRINTF(path, "%sdirs", cfg->data_dir);
SAFEPRINTF2(str, "%s%s"
SAFEPRINTF2(path, "%s%s"
, cfg->lib[cfg->dir[i]->lib]->code_prefix
, cfg->dir[i]->code_suffix);
strlwr(str);
SAFECAT(path,str);
strlwr(path);
}
else if (cfg->lib[cfg->dir[i]->lib]->parent_path[0]) {
SAFECOPY(path, cfg->lib[cfg->dir[i]->lib]->parent_path);
backslash(path);
SAFECAT(path, cfg->dir[i]->path);
if(cfg->lib[cfg->dir[i]->lib]->parent_path[0])
prep_dir(cfg->lib[cfg->dir[i]->lib]->parent_path, path, sizeof(path));
else {
if(cfg->dir[i]->data_dir[0])
SAFECOPY(str, cfg->dir[i]->data_dir);
else
SAFEPRINTF(str, "%sdirs", cfg->data_dir);
prep_dir(str, path, sizeof(path));
}
prep_dir(cfg->ctrl_dir, path, sizeof(path));
mkpath(path);
}
......
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