From 6ea53ec9ee5b345ec18be192279c5e15cd8ecedc Mon Sep 17 00:00:00 2001 From: obarun <eric@obarun.org> Date: Mon, 11 Mar 2019 10:19:16 +1100 Subject: [PATCH] allow multiple subdir at ss_resolve_src --- src/lib66/resolve.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib66/resolve.c b/src/lib66/resolve.c index 2075fe38..135166e1 100644 --- a/src/lib66/resolve.c +++ b/src/lib66/resolve.c @@ -177,7 +177,6 @@ int ss_resolve_src(genalloc *ga, stralloc *sasrc, char const *name, char const * stralloc sainsta = STRALLOC_ZERO ; stralloc subdir = STRALLOC_ZERO ; if (!stralloc_cats(&subdir,src)) goto errstra ; - //if (!stralloc_cats(&subdir,"/")) goto errstra ; obr = insta = 0 ; @@ -209,7 +208,7 @@ int ss_resolve_src(genalloc *ga, stralloc *sasrc, char const *name, char const * if (!stralloc_cats(&subdir,d->d_name)) goto errdir ; if (!stralloc_cats(&subdir,"/")) goto errdir ; if (!stralloc_0(&subdir)) goto errdir ; - *found = 2 ; + (*found)++ ; if (!ss_resolve_src(ga,sasrc,name,subdir.s,found)) goto errdir ; } obr = 0 ; @@ -272,7 +271,7 @@ int ss_resolve_src(genalloc *ga, stralloc *sasrc, char const *name, char const * if (*found > 1) { - *found = 0 ; + (*found)-- ; return 1 ; } -- GitLab