1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 01:57:52 +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:
Charles Kerr 2009-10-30 02:58:30 +00:00
parent 08fea5612f
commit d60fa654cb

View file

@ -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 );
}
}