From 388c5f43112ee94a7fca8b9a2f069227dd8372aa Mon Sep 17 00:00:00 2001 From: chme Date: Mon, 1 Aug 2016 21:27:05 +0200 Subject: [PATCH] [filescanner] Fix building directory structure with trailing '/' (second attempt) --- src/filescanner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filescanner.c b/src/filescanner.c index df60dcca..f575a7d9 100644 --- a/src/filescanner.c +++ b/src/filescanner.c @@ -1092,7 +1092,7 @@ process_parent_directories(char *path) ptr = path + 1; while (ptr && (ptr = strchr(ptr, '/'))) { - if ((ptr - path) > 0) + if (strlen(ptr) <= 1) { // Do not process trailing '/' break;