aboutsummaryrefslogtreecommitdiffstats
path: root/src/mapper.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-10-20 21:01:55 +0200
committerMax Kellermann <max@duempel.org>2009-10-20 21:01:55 +0200
commitc953d6409dffd476370ba639118cba97bcda2f35 (patch)
tree5920d5d03757ae9fd6fd753dcef7532d07bff96b /src/mapper.c
parent447e4d3583d3394a25f0fb186f50cea45dd7f797 (diff)
downloadmpd-c953d6409dffd476370ba639118cba97bcda2f35.tar.gz
mpd-c953d6409dffd476370ba639118cba97bcda2f35.tar.xz
mpd-c953d6409dffd476370ba639118cba97bcda2f35.zip
mapper, update, ...: use g_build_filename(), G_DIR_SEPARATOR, ...
Try to be as portable as possible, use GLib path name functions and macros.
Diffstat (limited to 'src/mapper.c')
-rw-r--r--src/mapper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mapper.c b/src/mapper.c
index 71127f51c..a48e12a35 100644
--- a/src/mapper.c
+++ b/src/mapper.c
@@ -169,10 +169,10 @@ map_fs_to_utf8(const char *path_fs)
{
if (music_dir != NULL &&
strncmp(path_fs, music_dir, music_dir_length) == 0 &&
- path_fs[music_dir_length] == '/')
+ G_IS_DIR_SEPARATOR(path_fs[music_dir_length]))
/* remove musicDir prefix */
path_fs += music_dir_length + 1;
- else if (path_fs[0] == '/')
+ else if (G_IS_DIR_SEPARATOR(path_fs[0]))
/* not within musicDir */
return NULL;