From a559ffac8c65f469adefcd2d4a5c41790d7e6d05 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 15 Apr 2019 10:21:22 -0400 Subject: [WIP] bftw: Push all files onto the queue before visiting them --- exec.c | 1 + 1 file changed, 1 insertion(+) (limited to 'exec.c') diff --git a/exec.c b/exec.c index 3a35063..06703ad 100644 --- a/exec.c +++ b/exec.c @@ -265,6 +265,7 @@ static int bfs_exec_openwd(struct bfs_exec *execbuf, const struct BFTW *ftwbuf) assert(execbuf->wd_fd < 0); assert(!execbuf->wd_path); + assert(ftwbuf->depth == 0 || ftwbuf->at_path == xbasename(ftwbuf->path)); if (ftwbuf->at_fd != AT_FDCWD) { execbuf->wd_fd = ftwbuf->at_fd; if (!(execbuf->flags & BFS_EXEC_MULTI)) { -- cgit v1.2.3