aboutsummaryrefslogtreecommitdiffstats
path: root/src/directory.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-20 22:18:12 +0200
committerMax Kellermann <max@duempel.org>2008-10-20 22:18:12 +0200
commitba96920a52bbd2208aa1f3b284edc864e26198ce (patch)
tree6750d817780ef892d82e0ce0aecaebd54546799a /src/directory.c
parent99e82a2ef293429e3fcc4f6e5d8e7981b4351c7c (diff)
downloadmpd-ba96920a52bbd2208aa1f3b284edc864e26198ce.tar.gz
mpd-ba96920a52bbd2208aa1f3b284edc864e26198ce.tar.xz
mpd-ba96920a52bbd2208aa1f3b284edc864e26198ce.zip
path: replaced mpd_basename() with g_path_get_basename()
GLib's g_path_get_basename() is much more reliable than mpd_basename(). The latter could be tricked into an assertion failure.
Diffstat (limited to '')
-rw-r--r--src/directory.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/directory.c b/src/directory.c
index f11695a95..ba1ae8560 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -22,6 +22,7 @@
#include <assert.h>
#include <string.h>
+#include <glib.h>
struct directory *
directory_new(const char *path, struct directory *parent)
@@ -53,7 +54,7 @@ directory_free(struct directory *directory)
const char *
directory_get_name(const struct directory *directory)
{
- return mpd_basename(directory->path);
+ return g_basename(directory->path);
}
void