Commit 331c9592 authored by Simon Morlat's avatar Simon Morlat
Browse files

fix bug when starting linphone from home directory on mac. In such case the...

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