summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bftw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bftw.c b/src/bftw.c
index bb155a4..11c4825 100644
--- a/src/bftw.c
+++ b/src/bftw.c
@@ -1281,8 +1281,8 @@ static int bftw_pin_parent(struct bftw_state *state, struct bftw_file *file) {
int fd = parent->fd;
if (fd < 0) {
- bfs_static_assert((int)AT_FDCWD != -1);
- return -1;
+ // Don't confuse failures with AT_FDCWD
+ return (int)AT_FDCWD == -1 ? -2 : -1;
}
bftw_cache_pin(&state->cache, parent);