Make config file realpathed, fixing unwritable config file problem on mac

This commit is contained in:
Ron Pedde 2006-07-07 20:36:24 +00:00
parent 328a4861fb
commit c20b3e52e9
1 changed files with 4 additions and 2 deletions

View File

@ -552,6 +552,7 @@ int conf_read(char *file) {
LL_ITEM *pli;
char linebuffer[CONF_LINEBUFFER+1];
char keybuffer[256];
char conf_file[PATH_MAX+1];
char *comment, *term, *value, *delim;
char *section_name=NULL;
char *prev_comments=NULL;
@ -572,9 +573,10 @@ int conf_read(char *file) {
free(conf_main_file);
}
conf_main_file = strdup(file);
realpath(file,conf_file);
conf_main_file = strdup(conf_file);
fin=fopen(file,"r");
fin=fopen(conf_file,"r");
if(!fin) {
return CONF_E_FOPEN;
}