Why is no. of files from count_files reset to 0?

classic Classic list List threaded Threaded
2 messages Options
Jan Janak-2 Jan Janak-2
Reply | Threaded
Open this post in threaded view
|

Why is no. of files from count_files reset to 0?

Hello,

The function count_file returns the total number of files to be
processed, the result is then stored in add_files_state.total_files.
But that variable is reset back to 0 in notmuch_new_command.

When I comment out the following line (before add_files is called):

add_files_state.total_files = 0;

The progress indicator shows the total number of files to be
processed, as well as the time remaining. This is, IMHO, much better,
especially if you process a large collection of emails.

Is there any reason for having the variable reset to 0 before calling
add_files? Thanks!

   -- Jan

Carl Worth-2 Carl Worth-2
Reply | Threaded
Open this post in threaded view
|

Re: Why is no. of files from count_files reset to 0?

On Wed, 18 Nov 2009 15:36:51 +0100, Jan Janak <[hidden email]> wrote:

> When I comment out the following line (before add_files is called):
>
> add_files_state.total_files = 0;
>
> The progress indicator shows the total number of files to be
> processed, as well as the time remaining. This is, IMHO, much better,
> especially if you process a large collection of emails.
>
> Is there any reason for having the variable reset to 0 before calling
> add_files? Thanks!

Just a bug. Thanks for pointing this out. It's fixed now---and it will
be nice for new users to have the countdown working once again.

-Carl