mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-27 08:19:30 +08:00
Merge pull request #2840 from pmzqla/numfiles
Use out of range value when the number of files can't be determined
This commit is contained in:
commit
970e7440c6
@ -243,6 +243,8 @@ bool QTorrentHandle::has_filtered_pieces() const
|
||||
|
||||
int QTorrentHandle::num_files() const
|
||||
{
|
||||
if (!has_metadata())
|
||||
return -1;
|
||||
#if LIBTORRENT_VERSION_NUM < 10000
|
||||
return torrent_handle::get_torrent_info().num_files();
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user