fix bug when starting linphone from home directory on mac. In such case the local .linphonerc is found but cannot be loaded because of the chdir() that occurs just before starting the library.

This commit is contained in:
Simon Morlat 2015-11-16 10:20:54 +01:00
parent 279fa89428
commit e6aff84852

View file

@ -166,10 +166,7 @@ char *linphone_gtk_get_config_file(const char *filename){
const int path_max=1024;
char *config_file=g_malloc0(path_max);
if (filename==NULL) filename=CONFIG_FILE;
/*try accessing a local file first if exists*/
if (access(CONFIG_FILE,F_OK)==0){
snprintf(config_file,path_max,"%s",filename);
} else if (g_path_is_absolute(filename)) {
if (g_path_is_absolute(filename)) {
snprintf(config_file,path_max,"%s",filename);
} else{
#ifdef WIN32