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;