aboutsummaryrefslogtreecommitdiffstats
path: root/src/command
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-03-03 12:42:27 +0100
committerMax Kellermann <max@duempel.org>2015-03-03 12:42:27 +0100
commit0febb218ed1ab5b530f4f3a62e0321678f41fb96 (patch)
treedfcce097a1d521eecafea6fe001edf4343d3242d /src/command
parentdfcfeeb5505c4fe55e7ba0e5d900b3045683843a (diff)
downloadmpd-0febb218ed1ab5b530f4f3a62e0321678f41fb96.tar.gz
mpd-0febb218ed1ab5b530f4f3a62e0321678f41fb96.tar.xz
mpd-0febb218ed1ab5b530f4f3a62e0321678f41fb96.zip
FileCommands: use Path::HasNewline()
Diffstat (limited to 'src/command')
-rw-r--r--src/command/FileCommands.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/command/FileCommands.cxx b/src/command/FileCommands.cxx
index fa5ff7f59..7673c0a2e 100644
--- a/src/command/FileCommands.cxx
+++ b/src/command/FileCommands.cxx
@@ -56,9 +56,9 @@ SkipNameFS(PathTraitsFS::const_pointer name_fs)
gcc_pure
static bool
-skip_path(PathTraitsFS::const_pointer name_fs)
+skip_path(Path name_fs)
{
- return strchr(name_fs, '\n') != nullptr;
+ return name_fs.HasNewline();
}
#if defined(WIN32) && GCC_CHECK_VERSION(4,6)
@@ -90,7 +90,7 @@ handle_listfiles_local(Client &client, const char *path_utf8)
while (reader.ReadEntry()) {
const Path name_fs = reader.GetEntry();
- if (SkipNameFS(name_fs.c_str()) || skip_path(name_fs.c_str()))
+ if (SkipNameFS(name_fs.c_str()) || skip_path(name_fs))
continue;
std::string name_utf8 = name_fs.ToUTF8();