forked from premiere/premiere-libtorrent
merged RC_1_1 into master
This commit is contained in:
commit
b80c477733
|
@ -62,8 +62,8 @@ before_install:
|
||||||
travis_retry brew install docutils;
|
travis_retry brew install docutils;
|
||||||
mkdir -p /Users/travis/Library/Python/2.7/lib/python/site-packages;
|
mkdir -p /Users/travis/Library/Python/2.7/lib/python/site-packages;
|
||||||
echo ''import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")'' >> /Users/travis/Library/Python/2.7/lib/python/site-packages/homebrew.pth;
|
echo ''import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")'' >> /Users/travis/Library/Python/2.7/lib/python/site-packages/homebrew.pth;
|
||||||
sudo easy_install Pygments;
|
easy_install --user Pygments;
|
||||||
sudo easy_install -U aafigure;
|
easy_install --user aafigure;
|
||||||
travis_retry brew install graphviz;
|
travis_retry brew install graphviz;
|
||||||
travis_retry brew install Homebrew/python/pillow;
|
travis_retry brew install Homebrew/python/pillow;
|
||||||
fi'
|
fi'
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
* require C++11 to build libtorrent
|
* require C++11 to build libtorrent
|
||||||
|
|
||||||
|
|
||||||
|
* move_storage did not work for torrents without metadata
|
||||||
* improve shutdown time by only announcing to trackers whose IP we know
|
* improve shutdown time by only announcing to trackers whose IP we know
|
||||||
* fix python3 portability issue in python binding
|
* fix python3 portability issue in python binding
|
||||||
* delay 5 seconds before reconnecting socks5 proxy for UDP ASSOCIATE
|
* delay 5 seconds before reconnecting socks5 proxy for UDP ASSOCIATE
|
||||||
|
|
|
@ -1218,7 +1218,7 @@ namespace {
|
||||||
offs = inf.AllocationSize;
|
offs = inf.AllocationSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (offs.QuadPart != s)
|
if (offs.QuadPart < s)
|
||||||
{
|
{
|
||||||
// if the user has permissions, avoid filling
|
// if the user has permissions, avoid filling
|
||||||
// the file with zeroes, but just fill it with
|
// the file with zeroes, but just fill it with
|
||||||
|
|
|
@ -7534,12 +7534,17 @@ namespace libtorrent {
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we don't have metadata yet, we don't know anything about the file
|
// if we don't have metadata yet, we don't know anything about the file
|
||||||
// structure and we have to assume we don't have any file. Deleting files
|
// structure and we have to assume we don't have any file.
|
||||||
// in this mode would cause us to (recursively) delete m_save_path, which
|
|
||||||
// is bad.
|
|
||||||
if (!valid_metadata())
|
if (!valid_metadata())
|
||||||
{
|
{
|
||||||
alerts().emplace_alert<torrent_deleted_alert>(get_handle(), m_torrent_file->info_hash());
|
if (alerts().should_post<storage_moved_alert>())
|
||||||
|
alerts().emplace_alert<storage_moved_alert>(get_handle(), save_path);
|
||||||
|
#if TORRENT_USE_UNC_PATHS
|
||||||
|
std::string path = canonicalize_path(save_path);
|
||||||
|
#else
|
||||||
|
std::string const& path = save_path;
|
||||||
|
#endif
|
||||||
|
m_save_path = complete(path);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -557,3 +557,19 @@ TORRENT_TEST(queue)
|
||||||
TEST_EQUAL(torrents[3].queue_position(), 4);
|
TEST_EQUAL(torrents[3].queue_position(), 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TORRENT_TEST(test_move_storage_no_metadata)
|
||||||
|
{
|
||||||
|
lt::session ses(settings());
|
||||||
|
add_torrent_params p;
|
||||||
|
p.save_path = "save_path";
|
||||||
|
error_code ec;
|
||||||
|
parse_magnet_uri("magnet?xt=urn:btih:abababababababababababababababababababab", p, ec);
|
||||||
|
torrent_handle h = ses.add_torrent(p);
|
||||||
|
|
||||||
|
TEST_EQUAL(h.status().save_path, complete("save_path"));
|
||||||
|
|
||||||
|
h.move_storage("save_path_1");
|
||||||
|
|
||||||
|
TEST_EQUAL(h.status().save_path, complete("save_path_1"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue