Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
e48d96c6
Commit
e48d96c6
authored
Sep 12, 2013
by
Guillaume Beraudo
Browse files
Fix opening of configuration file
Allow passing absolute filename.
parent
cbf99ae5
Changes
1
Hide whitespace changes
Inline
Side-by-side
gtk/main.c
View file @
e48d96c6
...
...
@@ -164,7 +164,9 @@ char *linphone_gtk_get_config_file(const char *filename){
/*try accessing a local file first if exists*/
if
(
access
(
CONFIG_FILE
,
F_OK
)
==
0
){
snprintf
(
config_file
,
path_max
,
"%s"
,
filename
);
}
else
{
}
else
if
(
g_path_is_absolute
(
filename
))
{
snprintf
(
config_file
,
path_max
,
"%s"
,
filename
);
}
else
{
#ifdef WIN32
const
char
*
appdata
=
getenv
(
"APPDATA"
);
if
(
appdata
){
...
...
@@ -1924,6 +1926,12 @@ int main(int argc, char *argv[]){
return
-
1
;
}
if
(
config_file
)
free
(
config_file
);
if
(
custom_config_file
&&
!
g_path_is_absolute
(
custom_config_file
))
{
gchar
*
res
=
g_get_current_dir
();
res
=
g_strjoin
(
G_DIR_SEPARATOR_S
,
res
,
custom_config_file
,
NULL
);
free
(
custom_config_file
);
custom_config_file
=
res
;
}
config_file
=
linphone_gtk_get_config_file
(
custom_config_file
);
settings
=
gtk_settings_get_default
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment