forked from premiere/premiere-libtorrent
handle web seed urls that don't end with / when they should
This commit is contained in:
parent
a961e253ef
commit
0aa477ce54
|
@ -162,9 +162,14 @@ namespace libtorrent
|
|||
|
||||
TORRENT_ASSERT(t->valid_metadata());
|
||||
|
||||
bool single_file_request = false;
|
||||
if (!m_path.empty() && m_path[m_path.size() - 1] != '/')
|
||||
single_file_request = true;
|
||||
bool single_file_request = t->torrent_file().num_files() == 1;
|
||||
|
||||
// handle incorrect .torrent files which are multi-file
|
||||
// but have web seeds not ending with a slash
|
||||
if (!single_file_request && (m_path.empty() || m_path[m_path.size() - 1] != '/'))
|
||||
{
|
||||
m_path += "/";
|
||||
}
|
||||
|
||||
torrent_info const& info = t->torrent_file();
|
||||
|
||||
|
|
Loading…
Reference in New Issue