reverted part of the file_storage API to match the previous one more closly

This commit is contained in:
Arvid Norberg
2010-11-29 05:44:29 +00:00
parent f82321c1dd
commit 2e69366b02
13 changed files with 232 additions and 195 deletions

View File

@@ -257,11 +257,11 @@ int run_suite(char const* protocol, bool test_url_seed, bool chunked_encoding)
// verify that the file hashes are correct
for (int i = 0; i < torrent_file->num_files(); ++i)
{
sha1_hash h1 = torrent_file->files().hash(torrent_file->file_at(i));
sha1_hash h1 = torrent_file->file_at(i).filehash;
sha1_hash h2 = file_hash(combine_path("./tmp1_web_seed"
, torrent_file->files().file_path(torrent_file->file_at(i))));
, torrent_file->file_at(i).path));
fprintf(stderr, "%s: %s == %s\n"
, torrent_file->files().file_path(torrent_file->file_at(i)).c_str()
, torrent_file->file_at(i).path.c_str()
, to_hex(h1.to_string()).c_str(), to_hex(h2.to_string()).c_str());
TEST_EQUAL(h1, h2);
}