summaryrefslogtreecommitdiffstats
path: root/bftw.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-10-22 21:05:47 -0400
committerTavian Barnes <tavianator@tavianator.com>2016-10-24 11:19:24 -0400
commit3c8233869d34713860c48b1230c3ea06b8767b88 (patch)
treed2c95dd2370cfd8b1255c08c83b953c29ccd91f2 /bftw.c
parent087b29c53e13299e195942e48ae309817f4f1d93 (diff)
downloadbfs-3c8233869d34713860c48b1230c3ea06b8767b88.tar.xz
Implement -ignore_readdir_race.
Diffstat (limited to 'bftw.c')
-rw-r--r--bftw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bftw.c b/bftw.c
index 45d2d27..f48d3f8 100644
--- a/bftw.c
+++ b/bftw.c
@@ -713,9 +713,12 @@ static void bftw_path_trim(struct bftw_state *state) {
* Record an error.
*/
static void bftw_set_error(struct bftw_state *state, int error) {
- state->error = error;
state->ftwbuf.error = error;
state->ftwbuf.typeflag = BFTW_ERROR;
+
+ if (!(state->flags & BFTW_RECOVER)) {
+ state->error = error;
+ }
}
/**