Ignore:
Timestamp:
Apr 2, 2011, 3:31:41 AM (11 years ago)
Author:
jordan
Message:

(trunk libT) tr_torrentFindFile2(): avoid an unnecessary malloc() + free() if the file we're looking for is complete and doesn't have a ".part" suffix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r12294 r12295  
    29772977                     const char ** base, char ** subpath )
    29782978{
    2979     char * part;
     2979    char * part = NULL;
    29802980    const tr_file * file;
    29812981    const char * b = NULL;
     
    29862986
    29872987    file = &tor->info.files[fileNum];
    2988     part = tr_torrentBuildPartial( tor, fileNum );
    29892988
    29902989    if( b == NULL ) {
     
    30063005    }
    30073006
     3007    if( b == NULL )
     3008        part = tr_torrentBuildPartial( tor, fileNum );
     3009
    30083010    if( ( b == NULL ) && ( tor->incompleteDir != NULL ) ) {
    30093011        char * filename = tr_buildPath( tor->incompleteDir, part, NULL );
Note: See TracChangeset for help on using the changeset viewer.