1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

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

This commit is contained in:
Charles Kerr 2008-09-28 16:02:13 +00:00
parent 4bf3577fba
commit 4caac75646

View file

@ -67,12 +67,11 @@ getFiles( const char * dir,
{
struct dirent *d;
for( d = readdir( odir ); d != NULL; d = readdir( odir ) )
if( d->d_name && d->d_name[0] != '.' ) /* skip dotfiles, ., and ..
*/
if( d->d_name && d->d_name[0] != '.' ) /* skip dotfiles */
list = getFiles( buf, d->d_name, list );
closedir( odir );
}
else if( S_ISREG( sb.st_mode ) )
else if( S_ISREG( sb.st_mode ) && ( sb.st_size > 0 ) )
{
struct FileList * node = tr_new( struct FileList, 1 );
node->size = sb.st_size;