Re: bug in filtering code - no trash emptying after applying filters



On 2001.10.29 02:24 James McPherson - TSG Engineer wrote:
> 
> Hi there.
> With balsa 1.2.1 there is a small bug in the filtering code. With
> the stock filtering code (from Manu's patch), if your filter dumps 
> messages
> in balsa_app.trash ("Send to Trash") the status flag on the trash folder
> is not set correctly: you need to send some other message to the trash
> folder before you can empty your trash folder.
> 
> This is fixed with two small edits to libbalsa/filter.c:
> 
> (1) #include "src/main-window.h"
> 
> (need the TRASH_* status definitions)
> 
> (2) in the filters_run_on_messages(...) routine, change the if (...) 
> statement
>      so that it is an if (..) {..} else {..} statement:
> 
> 
> case FILTER_TRASH:
>    if (!balsa_app.trash ||
>        !libbalsa_messages_move(filt->matching_messages,balsa_app.trash)) 
> {
>           libbalsa_information(LIBBALSA_INFORMATION_ERROR,"Error when 
> trashing messages");
>    } else {
>           enable_empty_trash(TRASH_FULL);
>    }
>    break;
> 
> 
> 
> I've bugzilla-d this and included the above as a patch against Manu's 
> patches
> for 1.2.1 via bug 61072. The new bugid is 63258.

OK thanks, I didn't know that I had to call enable_empty_trash (in fact I 
didn't even know it existed).



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]