mirror of
https://github.com/transmission/transmission
synced 2024-12-27 10:07:40 +00:00
(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:
parent
9c0646553a
commit
d8c098f7a8
1 changed files with 6 additions and 8 deletions
|
@ -592,14 +592,12 @@ tr_sessionLoadTorrents ( tr_handle * h,
|
||||||
tr_torrent * tor;
|
tr_torrent * tor;
|
||||||
char filename[MAX_PATH_LENGTH];
|
char filename[MAX_PATH_LENGTH];
|
||||||
tr_buildPath( filename, sizeof(filename), dirname, d->d_name, NULL );
|
tr_buildPath( filename, sizeof(filename), dirname, d->d_name, NULL );
|
||||||
if( tr_stringEndsWith( filename, ".torrent" ) )
|
|
||||||
{
|
tr_ctorSetMetainfoFromFile( ctor, filename );
|
||||||
tr_ctorSetMetainfoFromFile( ctor, filename );
|
tor = tr_torrentNew( h, ctor, NULL );
|
||||||
tor = tr_torrentNew( h, ctor, NULL );
|
if( tor ) {
|
||||||
if( tor ) {
|
tr_list_append( &list, tor );
|
||||||
tr_list_append( &list, tor );
|
++n;
|
||||||
++n;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue