aboutsummaryrefslogtreecommitdiffstats
path: root/src/Directory.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-21 10:26:53 +0200
committerMax Kellermann <max@duempel.org>2013-10-21 10:50:22 +0200
commit83c726a34f325ae5be0d5b61b66a97cb41f6973e (patch)
treeff65ffc34bd655cce2a52b9e84d5a762ea0f021e /src/Directory.cxx
parenta0415f73d459b5763f59dfa4151ec89834d29526 (diff)
downloadmpd-83c726a34f325ae5be0d5b61b66a97cb41f6973e.tar.gz
mpd-83c726a34f325ae5be0d5b61b66a97cb41f6973e.tar.xz
mpd-83c726a34f325ae5be0d5b61b66a97cb41f6973e.zip
GetBaseUTF8
Diffstat (limited to 'src/Directory.cxx')
-rw-r--r--src/Directory.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/Directory.cxx b/src/Directory.cxx
index 25568bb19..c06090204 100644
--- a/src/Directory.cxx
+++ b/src/Directory.cxx
@@ -24,6 +24,7 @@
#include "DatabaseLock.hxx"
#include "SongSort.hxx"
#include "Song.hxx"
+#include "fs/Traits.hxx"
#include "util/Error.hxx"
extern "C" {
@@ -112,14 +113,8 @@ const char *
Directory::GetName() const
{
assert(!IsRoot());
- assert(path != nullptr);
-
- const char *slash = strrchr(path, '/');
- assert((slash == nullptr) == parent->IsRoot());
- return slash != nullptr
- ? slash + 1
- : path;
+ return PathTraits::GetBaseUTF8(path);
}
Directory *