Merge pull request #280 from chme/scandirectories2

[filescanner] Fix building directory structure with trailing '/'
This commit is contained in:
ejurgensen 2016-08-01 21:54:59 +02:00 committed by GitHub
commit 09e35abb83

View File

@ -1092,7 +1092,7 @@ process_parent_directories(char *path)
ptr = path + 1; ptr = path + 1;
while (ptr && (ptr = strchr(ptr, '/'))) while (ptr && (ptr = strchr(ptr, '/')))
{ {
if ((ptr - path) > 0) if (strlen(ptr) <= 1)
{ {
// Do not process trailing '/' // Do not process trailing '/'
break; break;