lt sync 1623
This commit is contained in:
parent
e833a2d75e
commit
2e0d50407b
|
@ -60,10 +60,17 @@ namespace libtorrent
|
|||
{
|
||||
logger(fs::path const& filename, int instance, bool append = true)
|
||||
{
|
||||
fs::path dir(fs::complete("libtorrent_logs" + boost::lexical_cast<std::string>(instance)));
|
||||
if (!fs::exists(dir)) fs::create_directories(dir);
|
||||
m_file.open((dir / filename).string().c_str(), std::ios_base::out | (append ? std::ios_base::app : std::ios_base::out));
|
||||
*this << "\n\n\n*** starting log ***\n";
|
||||
try
|
||||
{
|
||||
fs::path dir(fs::complete("libtorrent_logs" + boost::lexical_cast<std::string>(instance)));
|
||||
if (!fs::exists(dir)) fs::create_directories(dir);
|
||||
m_file.open((dir / filename).string().c_str(), std::ios_base::out | (append ? std::ios_base::app : std::ios_base::out));
|
||||
*this << "\n\n\n*** starting log ***\n";
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
std::cerr << "failed to create log '" << filename << "': " << e.what() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
|
|
@ -394,4 +394,3 @@ namespace libtorrent
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -3030,4 +3030,3 @@ namespace libtorrent
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -775,6 +775,8 @@ namespace libtorrent
|
|||
|
||||
if (total_done >= m_torrent_file->total_size())
|
||||
{
|
||||
// Thist happens when a piece has been downloaded completely
|
||||
// but not yet verified against the hash
|
||||
std::copy(m_have_pieces.begin(), m_have_pieces.end()
|
||||
, std::ostream_iterator<bool>(std::cerr, " "));
|
||||
std::cerr << std::endl;
|
||||
|
|
|
@ -363,7 +363,7 @@ namespace libtorrent
|
|||
aux::piece_checker_data* d = m_chk->find_torrent(m_info_hash);
|
||||
if (d != 0)
|
||||
{
|
||||
torrent_status st;
|
||||
torrent_status st = d->torrent_ptr->status();
|
||||
|
||||
if (d->processing)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue