Changeset 458 for trunk


Ignore:
Timestamp:
Aug 25, 2010, 3:52:23 PM (11 years ago)
Author:
Silvan Scherrer
Message:

possible fixed ticket:135

Location:
trunk/Lucide/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/gui/lcdfdlg.cpp

    r367 r458  
    644644    }
    645645
    646 
    647646    ULONG ealen = 0;
    648647    PVOID eadata = getEA( fn, "LUCIDE_THUMBNAIL", &ealen );
    649 
    650648    if ( eadata != NULL )
    651649    {
     650        // as we need to deal with old and new ea style, we need to know which style
     651        char *eadata2 = (char*)eadata;
     652        if (*((ushort*)eadata2) == EAT_BINARY)
     653        {
     654             eadata2 += sizeof(long);
     655             ealen -= sizeof(long);
     656        }
     657
    652658        char *tmpgif = new char[ CCHMAXPATH ];
    653659        getTmpDir( tmpgif );
     
    658664        if ( h != -1 )
    659665        {
    660             ULONG wrt = write( h, eadata, ealen );
     666            ULONG wrt = write( h, eadata2, ealen );
    661667            close( h );
    662668            if ( wrt == ealen ) {
  • trunk/Lucide/gui/lucidethumbs.cpp

    r367 r458  
    213213    memcpy( databufp, ea_name, ea_name_len+1 ); // with trailing zero
    214214    databufp += ea_name_len+1;
     215
     216    // set the ea type and length
     217    *((short*)databufp) = EAT_BINARY;
     218    databufp += sizeof(short);
     219    *((short*)databufp) = (short)ea_data_len;
     220    databufp += sizeof(short);
     221
    215222    memcpy( databufp, ea_data, ea_data_len ); // with trailing zero
    216223    databufp += ea_data_len;
Note: See TracChangeset for help on using the changeset viewer.