summaryrefslogtreecommitdiffstats
path: root/bftw.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2021-01-28 14:35:33 -0500
committerTavian Barnes <tavianator@tavianator.com>2021-01-28 15:00:23 -0500
commitad058cc871a51f1da2dba0a179891f0b96be2c0d (patch)
tree8854c80c32702d2cd9c39d671451d80ef581be54 /bftw.c
parentbcfbb81b8b3fe6a1d59c2097b4741bd4aae344e4 (diff)
downloadbfs-ad058cc871a51f1da2dba0a179891f0b96be2c0d.tar.xz
bftw: Allow for NULL base when recovering from EMFILE
Diffstat (limited to 'bftw.c')
-rw-r--r--bftw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bftw.c b/bftw.c
index 5a38066..fd48d4f 100644
--- a/bftw.c
+++ b/bftw.c
@@ -385,7 +385,7 @@ static int bftw_file_openat(struct bftw_cache *cache, struct bftw_file *file, co
if (fd < 0 && errno == EMFILE) {
if (bftw_cache_shrink(cache, base) == 0) {
- fd = openat(base->fd, at_path, flags);
+ fd = openat(at_fd, at_path, flags);
}
}