mirror of
https://github.com/transmission/transmission
synced 2025-02-18 20:30:43 +00:00
(trunk libT) #3562 ".torrent files are created incorrectly when the content is a single file inside a subdirectory" -- fixed.
This commit is contained in:
parent
65b4e28c60
commit
51a61bc1da
1 changed files with 5 additions and 2 deletions
|
@ -336,12 +336,15 @@ 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( builder->fileCount == 1 )
|
||||
if( single_file_mode )
|
||||
{
|
||||
tr_bencDictAddInt( dict, "length", builder->files[0].size );
|
||||
else
|
||||
}
|
||||
else /* multiple file mode */
|
||||
{
|
||||
uint32_t i;
|
||||
tr_benc * list = tr_bencDictAddList( dict, "files",
|
||||
|
|
Loading…
Reference in a new issue