Richard Marko <[email protected]> writes: > Fixes Bug 800828 - Upload directory feature does not work correctly > > Signed-off-by: Richard Marko <[email protected]> > --- > src/daemon/abrtd.c | 14 ++++++++++---- > 1 files changed, 10 insertions(+), 4 deletions(-) > > diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c > index 3189b5c..6478201 100644 > --- a/src/daemon/abrtd.c > +++ b/src/daemon/abrtd.c > @@ -353,10 +353,16 @@ static mw_result_t > run_post_create_and_load_data(const char *dump_dir_name, prob > /* Update count */ > char *count_str = dd_load_text_ext(dd, FILENAME_COUNT, > DD_FAIL_QUIETLY_ENOENT); > unsigned long count = strtoul(count_str, NULL, 10); > - count++; > - char new_count_str[sizeof(long)*3 + 2]; > - sprintf(new_count_str, "%lu", count); > - dd_save_text(dd, FILENAME_COUNT, new_count_str); > + > + /* Don't increase crash count if we are working with newly uploaded > + * directory (remote crash) which already has it's crash count set. > + */ > + if(status != 0 || count == 0) { > + count++; > + char new_count_str[sizeof(long)*3 + 2]; > + sprintf(new_count_str, "%lu", count); > + dd_save_text(dd, FILENAME_COUNT, new_count_str); > + } > dd_close(dd); > > *problem_data = load_problem_data(dump_dir_name);
problem is not in abrtd.c but in logic somewhere in abrt-handle-event.c, because it prints DUP_OF_DIR: <its-self> -- Nikola
