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

Created new make_data_dirs() function to create data directory and hard-coded...

Created new make_data_dirs() function to create data directory and hard-coded sub-directories if they don't already exist.
parent 024a694c
......@@ -73,6 +73,7 @@ BOOL read_msgs_cfg(scfg_t* cfg, read_cfg_text_t* txt);
BOOL read_chat_cfg(scfg_t* cfg, read_cfg_text_t* txt);
BOOL read_attr_cfg(scfg_t* cfg, read_cfg_text_t* txt);
void prep_path(char* base, char* path);
void make_data_dirs(scfg_t* cfg);
void free_node_cfg(scfg_t* cfg);
void free_main_cfg(scfg_t* cfg);
......
......@@ -918,4 +918,30 @@ void free_msgs_cfg(scfg_t* cfg)
}
/************************************************************/
/* Create data and sub-dirs off data if not already created */
/************************************************************/
void make_data_dirs(scfg_t* cfg)
{
char str[MAX_PATH+1];
md(cfg->data_dir);
sprintf(str,"%ssubs",cfg->data_dir);
md(str);
sprintf(str,"%sdirs",cfg->data_dir);
md(str);
sprintf(str,"%stext",cfg->data_dir);
md(str);
sprintf(str,"%smsgs",cfg->data_dir);
md(str);
sprintf(str,"%suser",cfg->data_dir);
md(str);
sprintf(str,"%suser/ptrs",cfg->data_dir);
md(str);
sprintf(str,"%slogs",cfg->data_dir);
md(str);
sprintf(str,"%sqnet",cfg->data_dir);
md(str);
sprintf(str,"%sfile",cfg->data_dir);
md(str);
}
\ No newline at end of file
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