mirror of
https://github.com/transmission/transmission
synced 2025-02-15 10:54:42 +00:00
(libt) r11244 introduced a regression when making single file torrents
This commit is contained in:
parent
865d9d7a34
commit
9cc56f3c7c
1 changed files with 2 additions and 3 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue