Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
2151e2ea
Commit
2151e2ea
authored
Jan 15, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mapper: check if g_get_user_special_dir() is supported by GLib
g_get_user_special_dir() was introduced with GLib 2.14. Don't use it in older versions.
parent
6139174d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
mapper.c
src/mapper.c
+2
-0
No files found.
src/mapper.c
View file @
2151e2ea
...
...
@@ -51,10 +51,12 @@ void mapper_init(void)
if
(
music_dir_param
!=
NULL
)
{
music_dir
=
g_strdup
(
music_dir_param
->
value
);
}
else
{
#if GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 14)
music_dir
=
g_strdup
(
g_get_user_special_dir
(
G_USER_DIRECTORY_MUSIC
));
if
(
music_dir
==
NULL
)
/* GLib failed to determine the XDG music
directory - abort */
#endif
g_error
(
"config parameter
\"
%s
\"
not found
\n
"
,
CONF_MUSIC_DIR
);
}
...
...
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