Re: Here is a case where libmutt destroyes the context behind us (I think)



On 11.03.2002 15:28 Carlos Morgado wrote:
> 
> On 2002.03.10 19:12:31 +0000 Emmanuel wrote:
>> 	Hi all,
>> in mx_sync_mailbox : look at the following line :
>> 
>>      if (ctx->msgcount == ctx->deleted &&
>> 	(ctx->magic == M_MBOX || ctx->magic == M_MMDF) &&
>> 	!mutt_is_spool (ctx->path) && !option (OPTSAVEEMPTY))
>>      {
>>        unlink (ctx->path);
>>        mx_fastclose_mailbox (ctx);
>>        return 0;
>>      }
>> 
>> This is not undefed by LIBMUTT so we use this code. It seems that in 
>> the case you
>> have deleted all messages in a mailbox (ctx->msgcount==ctx->deleted) and
>> that mailbox is of type MBOX or Maildir libmutt can destroy the context
>> behind us. The only fact I'm not sure if for the flags OPTSAVEEMPTY. We
>> don't set it in libbalsa/libbalsa.c, but I don't know his default.
>> Hope it helps.
>> Bye
>> Manu
>> 
> 
> this might as well be ifdefed out as we always have OPTSAVEEMPTY set.
> if it's false it tells libmutt to delete empty mboxes which in turn
> breaks the folder tree and whatnot
> 
Oops I missed the set_option(OPTSAVEEMPTY) in libbalsa.c. But I looked at 
other places where libmutt calls mx_fastclose() but did not see any 
suspect place (ie places where libmutt would destroy the context behind 
us). Humm these bugs with invalid contexts seem strange to me. Any 
progress has been made?
Bye
Manu



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