Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jean-Baptiste Kempf
libaacs
Commits
7957233a
Commit
7957233a
authored
May 07, 2015
by
npzacs
Browse files
Use str_dup()
parent
2a73b6d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/file/dirs_xdg.c
View file @
7957233a
...
...
@@ -44,7 +44,7 @@ char *file_get_config_home(void)
{
const
char
*
xdg_home
=
getenv
(
"XDG_CONFIG_HOME"
);
if
(
xdg_home
&&
*
xdg_home
)
{
return
str_
printf
(
"%s"
,
xdg_home
);
return
str_
dup
(
xdg_home
);
}
const
char
*
user_home
=
getenv
(
"HOME"
);
...
...
@@ -60,7 +60,7 @@ char *file_get_data_home(void)
{
const
char
*
xdg_home
=
getenv
(
"XDG_DATA_HOME"
);
if
(
xdg_home
&&
*
xdg_home
)
{
return
str_
printf
(
"%s"
,
xdg_home
);
return
str_
dup
(
xdg_home
);
}
const
char
*
user_home
=
getenv
(
"HOME"
);
...
...
@@ -76,7 +76,7 @@ char *file_get_cache_home(void)
{
const
char
*
xdg_cache
=
getenv
(
"XDG_CACHE_HOME"
);
if
(
xdg_cache
&&
*
xdg_cache
)
{
return
str_
printf
(
"%s"
,
xdg_cache
);
return
str_
dup
(
xdg_cache
);
}
const
char
*
user_home
=
getenv
(
"HOME"
);
...
...
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