(libT) ensure that .torrents and stats aren't lost when migrating to 1.30 from < 1.20. Thanks to Michael Dürwald for reporting this bug.

This commit is contained in:
Charles Kerr 2008-07-25 19:55:09 +00:00
parent 9c0646553a
commit d8c098f7a8
1 changed files with 6 additions and 8 deletions

View File

@ -592,14 +592,12 @@ tr_sessionLoadTorrents ( tr_handle * h,
tr_torrent * tor;
char filename[MAX_PATH_LENGTH];
tr_buildPath( filename, sizeof(filename), dirname, d->d_name, NULL );
if( tr_stringEndsWith( filename, ".torrent" ) )
{
tr_ctorSetMetainfoFromFile( ctor, filename );
tor = tr_torrentNew( h, ctor, NULL );
if( tor ) {
tr_list_append( &list, tor );
++n;
}
tr_ctorSetMetainfoFromFile( ctor, filename );
tor = tr_torrentNew( h, ctor, NULL );
if( tor ) {
tr_list_append( &list, tor );
++n;
}
}
}