diff --git a/src/path.c b/src/path.c index c3d3eb1ce..9b15c8cf9 100644 --- a/src/path.c +++ b/src/path.c @@ -700,7 +700,8 @@ static bool _check_dir_contents( return false; /* save excursion */ - git_buf_joinpath(dir, dir->ptr, sub); + if (git_buf_joinpath(dir, dir->ptr, sub) < 0) + return false; result = predicate(dir->ptr);