(libt) r11244 introduced a regression when making single file torrents

This commit is contained in:
Daniel Lee 2010-09-30 05:22:33 +00:00
parent 865d9d7a34
commit 9cc56f3c7c
1 changed files with 2 additions and 3 deletions

View File

@ -336,15 +336,14 @@ makeInfoDict( tr_benc * dict,
{
uint8_t * pch;
char * base;
const tr_bool single_file_mode = ( builder->fileCount == 1 ) && ( strchr( builder->files[0].filename, '/' ) == NULL );
tr_bencDictReserve( dict, 5 );
if( single_file_mode )
if( builder->isSingleFile )
{
tr_bencDictAddInt( dict, "length", builder->files[0].size );
}
else /* multiple file mode */
else /* root node is a directory */
{
uint32_t i;
tr_benc * list = tr_bencDictAddList( dict, "files",