aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/update/InotifyQueue.cxx
diff options
context:
space:
mode:
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] == '/'));
}