summaryrefslogtreecommitdiffstats
path: root/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c1
1 files changed, 1 insertions, 0 deletions
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)) {