mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07: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
1 changed files with 2 additions and 0 deletions
|
@ -243,6 +243,8 @@ bool QTorrentHandle::has_filtered_pieces() const
|
||||||
|
|
||||||
int QTorrentHandle::num_files() const
|
int QTorrentHandle::num_files() const
|
||||||
{
|
{
|
||||||
|
if (!has_metadata())
|
||||||
|
return -1;
|
||||||
#if LIBTORRENT_VERSION_NUM < 10000
|
#if LIBTORRENT_VERSION_NUM < 10000
|
||||||
return torrent_handle::get_torrent_info().num_files();
|
return torrent_handle::get_torrent_info().num_files();
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue