mirror of
https://github.com/transmission/transmission
synced 2024-12-26 09:37:56 +00:00
(trunk libT) fix regression introduced by #2539 that caused single-file torrents to not be deleted even if the user requested it
This commit is contained in:
parent
08fea5612f
commit
d60fa654cb
1 changed files with 13 additions and 1 deletions
|
@ -2353,12 +2353,24 @@ tr_torrentDeleteLocalData( tr_torrent * tor, tr_fileFunc fileFunc )
|
|||
tr_fdTorrentClose( tor->session, tor->uniqueId );
|
||||
|
||||
if( tor->info.fileCount > 1 )
|
||||
{
|
||||
deleteLocalData( tor, fileFunc );
|
||||
else {
|
||||
}
|
||||
else
|
||||
{
|
||||
char * tmp;
|
||||
|
||||
/* torrent only has one file */
|
||||
char * path = tr_buildPath( tor->currentDir, tor->info.files[0].name, NULL );
|
||||
fileFunc( path );
|
||||
tr_free( path );
|
||||
|
||||
|
||||
tmp = tr_torrentBuildPartial( tor, 0 );
|
||||
path = tr_buildPath( tor->currentDir, tmp, NULL );
|
||||
fileFunc( path );
|
||||
tr_free( path );
|
||||
tr_free( tmp );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue