summaryrefslogtreecommitdiffstats
path: root/bftw.c
diff options
context:
space:
mode:
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;
+ }
}
/**