Changeset 3668

Show
Ignore:
Timestamp:
05/15/08 15:46:08
Author:
jdapena
Message:

* libtinymail-camel/camel-lite/camel/providers/pop3/camel-pop3-folder.c:

        • Fix attachment heuristics.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • releases/modest/diablo-pe1/libtinymail-camel/camel-lite/camel/providers/pop3/camel-pop3-folder.c

    r3587 r3668  
    387387                        { 
    388388 
    389                                 if (mi) { 
    390                                         struct _camel_header_raw *h; 
     389                                struct _camel_header_raw *h; 
     390                                 
     391                                h = ((CamelMimePart *)msg)->headers; 
     392                                if (camel_header_raw_find(&h, "X-MSMail-Priority", NULL) && 
     393                                    !camel_header_raw_find(&h, "X-MS-Has-Attach", NULL)) { 
    391394                                         
    392                                         h = ((CamelMimePart *)msg)->headers; 
    393                                         if (camel_header_raw_find(&h, "X-MSMail-Priority", NULL) && 
    394                                             !camel_header_raw_find(&h, "X-MS-Has-Attach", NULL)) { 
    395                                                  
    396                                                 ((CamelMessageInfoBase *)mi)->flags &= ~CAMEL_MESSAGE_ATTACHMENTS; 
    397  
    398                                         } else if (!camel_header_raw_find (&h, "X-MS-Has-Attach", NULL)) { 
    399                                                  
    400                                                 mi = (CamelMessageInfoBase*) camel_folder_summary_uid (folder->summary, fi->uid); 
    401                                                 mi->size = (fi->size); 
    402                                                 /* TNY TODO: This is a hack! But else we need to parse 
    403                                                  * BODYSTRUCTURE (and I'm lazy). It needs fixing though. */ 
    404                                                 if (mi->size > 102400) 
    405                                                         mi->flags |= CAMEL_MESSAGE_ATTACHMENTS; 
    406                                                 /* ... it does */ 
    407                                                 camel_message_info_free (mi); 
    408                                         } 
     395                                        ((CamelMessageInfoBase *)mi)->flags &= ~CAMEL_MESSAGE_ATTACHMENTS; 
     396                                         
     397                                } else if (!camel_header_raw_find (&h, "X-MS-Has-Attach", NULL)) { 
     398                                         
     399                                        mi = (CamelMessageInfoBase*) camel_folder_summary_uid (folder->summary, fi->uid); 
     400                                        mi->size = (fi->size); 
     401                                        /* TNY TODO: This is a hack! But else we need to parse 
     402                                         * BODYSTRUCTURE (and I'm lazy). It needs fixing though. */ 
     403                                        if (mi->size > 102400) 
     404                                                mi->flags |= CAMEL_MESSAGE_ATTACHMENTS; 
     405                                        /* ... it does */ 
     406                                        camel_message_info_free (mi); 
    409407                                } 
    410408