Changeset 6808


Ignore:
Timestamp:
Sep 28, 2008, 4:02:13 PM (13 years ago)
Author:
charles
Message:

(libT) #1267: when making new torrents, don't allow 0-byte files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/makemeta.c

    r6795 r6808  
    6868        struct dirent *d;
    6969        for( d = readdir( odir ); d != NULL; d = readdir( odir ) )
    70             if( d->d_name && d->d_name[0] != '.' ) /* skip dotfiles, ., and ..
    71                                                      */
     70            if( d->d_name && d->d_name[0] != '.' ) /* skip dotfiles */
    7271                list = getFiles( buf, d->d_name, list );
    7372        closedir( odir );
    7473    }
    75     else if( S_ISREG( sb.st_mode ) )
     74    else if( S_ISREG( sb.st_mode ) && ( sb.st_size > 0 ) )
    7675    {
    7776        struct FileList * node = tr_new( struct FileList, 1 );
Note: See TracChangeset for help on using the changeset viewer.