forked from premiere/premiere-libtorrent
fix windows web seed path divider issue with recent web seeding feature
This commit is contained in:
parent
c4dded04ca
commit
a3f0c04090
|
@ -152,8 +152,22 @@ namespace libtorrent
|
|||
{
|
||||
// handle .torrent files that don't include the filename in the url
|
||||
if (m_path.empty()) m_path += "/" + t->torrent_file().name();
|
||||
else if (m_path[m_path.size() - 1] == '/') m_path += t->torrent_file().files().at(0).path;
|
||||
if (!m_url.empty() && m_url[m_url.size() - 1] == '/') m_url += t->torrent_file().files().at(0).path;
|
||||
else if (m_path[m_path.size() - 1] == '/')
|
||||
{
|
||||
std::string tmp = t->torrent_file().files().at(0).path;
|
||||
#ifdef TORRENT_WINDOWS
|
||||
convert_path_to_posix(tmp);
|
||||
#endif
|
||||
m_path += tmp;
|
||||
}
|
||||
else if (!m_url.empty() && m_url[m_url.size() - 1] == '/')
|
||||
{
|
||||
std::string tmp = t->torrent_file().files().at(0).path;
|
||||
#ifdef TORRENT_WINDOWS
|
||||
convert_path_to_posix(tmp);
|
||||
#endif
|
||||
m_url += tmp;
|
||||
}
|
||||
}
|
||||
|
||||
torrent_info const& info = t->torrent_file();
|
||||
|
|
Loading…
Reference in New Issue