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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user