Changeset 405


Ignore:
Timestamp:
Jun 20, 2006, 2:34:34 AM (11 years ago)
Author:
titer
Message:

Don't assume that a download is a folder if there only is one
file (fixes #36)

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/metainfo.c

    r310 r405  
    222222        strcatUTF8( inf->name, val->val.s.s );
    223223
     224        inf->multifile = 1;
    224225        inf->fileCount = list->val.l.count;
    225226        inf->files     = calloc( inf->fileCount * sizeof( tr_file_t ), 1 );
     
    244245    {
    245246        /* Single-file mode */
     247        inf->multifile = 0;
    246248        inf->fileCount = 1;
    247249        inf->files     = calloc( sizeof( tr_file_t ), 1 );
  • trunk/libtransmission/transmission.h

    r310 r405  
    262262
    263263    /* Files info */
     264    int         multifile;
    264265    int         fileCount;
    265266    tr_file_t * files;
  • trunk/macosx/Torrent.m

    r396 r405  
    572572    fFinishedSeeding = NO;
    573573   
    574     NSString * fileType = ( fInfo->fileCount > 1 ) ?
     574    NSString * fileType = fInfo->multifile ?
    575575        NSFileTypeForHFSTypeCode('fldr') : [[self name] pathExtension];
    576576    fIcon = [[NSWorkspace sharedWorkspace] iconForFileType: fileType];
Note: See TracChangeset for help on using the changeset viewer.