Changeset 11244


Ignore:
Timestamp:
Sep 21, 2010, 4:58:15 PM (12 years ago)
Author:
charles
Message:

(trunk libT) #3562 ".torrent files are created incorrectly when the content is a single file inside a subdirectory" -- fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/makemeta.c

    r10970 r11244  
    337337    uint8_t * pch;
    338338    char    * base;
     339    const tr_bool single_file_mode = ( builder->fileCount == 1 ) && ( strchr( builder->files[0].filename, '/' ) == NULL );
    339340
    340341    tr_bencDictReserve( dict, 5 );
    341342
    342     if( builder->fileCount == 1 )
     343    if( single_file_mode )
     344    {
    343345        tr_bencDictAddInt( dict, "length", builder->files[0].size );
    344     else
     346    }
     347    else /* multiple file mode */
    345348    {
    346349        uint32_t  i;
Note: See TracChangeset for help on using the changeset viewer.