aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/update/InotifyQueue.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-11-06 09:37:07 +0100
committerMax Kellermann <max@duempel.org>2015-11-06 09:37:07 +0100
commitc880099deb41c09ea7844daa27a42dac4142c0cd (patch)
tree571482d1e6e7efc95ab7d443f246232188d3c23f /src/db/update/InotifyQueue.cxx
parent42f5ecd4a116c96d30bf407859dadaa9a053ea39 (diff)
downloadmpd-c880099deb41c09ea7844daa27a42dac4142c0cd.tar.gz
mpd-c880099deb41c09ea7844daa27a42dac4142c0cd.tar.xz
mpd-c880099deb41c09ea7844daa27a42dac4142c0cd.zip
util/StringCompare: add StringIsEmpty()
Diffstat (limited to 'src/db/update/InotifyQueue.cxx')
-rw-r--r--src/db/update/InotifyQueue.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/db/update/InotifyQueue.cxx b/src/db/update/InotifyQueue.cxx
index 4b5269427..392ac4110 100644
--- a/src/db/update/InotifyQueue.cxx
+++ b/src/db/update/InotifyQueue.cxx
@@ -22,6 +22,7 @@
#include "InotifyDomain.hxx"
#include "Service.hxx"
#include "Log.hxx"
+#include "util/StringCompare.hxx"
#include <string.h>
@@ -59,7 +60,7 @@ path_in(const char *path, const char *possible_parent)
{
size_t length = strlen(possible_parent);
- return path[0] == 0 ||
+ return StringIsEmpty(path) ||
(memcmp(possible_parent, path, length) == 0 &&
(path[length] == 0 || path[length] == '/'));
}