Lines 352-358
Link Here
|
352 |
fs::path tmp = m_name; |
352 |
fs::path tmp = m_name; |
353 |
if (tmp.is_complete()) throw std::runtime_error("torrent contains " |
353 |
if (tmp.is_complete()) throw std::runtime_error("torrent contains " |
354 |
"a file with an absolute path: '" + m_name + "'"); |
354 |
"a file with an absolute path: '" + m_name + "'"); |
355 |
if (tmp.has_branch_path()) throw std::runtime_error( |
355 |
if (tmp.has_parent_path()) throw std::runtime_error( |
356 |
"torrent contains name with directories: '" + m_name + "'"); |
356 |
"torrent contains name with directories: '" + m_name + "'"); |
357 |
|
357 |
|
358 |
// extract file list |
358 |
// extract file list |
Lines 556-562
Link Here
|
556 |
{ |
556 |
{ |
557 |
// TORRENT_ASSERT(file.begin() != file.end()); |
557 |
// TORRENT_ASSERT(file.begin() != file.end()); |
558 |
|
558 |
|
559 |
if (!file.has_branch_path()) |
559 |
if (!file.has_parent_path()) |
560 |
{ |
560 |
{ |
561 |
// you have already added at least one file with a |
561 |
// you have already added at least one file with a |
562 |
// path to the file (branch_path), which means that |
562 |
// path to the file (branch_path), which means that |
Lines 644-650
Link Here
|
644 |
fs::path const* file_path; |
644 |
fs::path const* file_path; |
645 |
if (i->orig_path) file_path = &(*i->orig_path); |
645 |
if (i->orig_path) file_path = &(*i->orig_path); |
646 |
else file_path = &i->path; |
646 |
else file_path = &i->path; |
647 |
TORRENT_ASSERT(file_path->has_branch_path()); |
647 |
TORRENT_ASSERT(file_path->has_parent_path()); |
648 |
TORRENT_ASSERT(*file_path->begin() == m_name); |
648 |
TORRENT_ASSERT(*file_path->begin() == m_name); |
649 |
|
649 |
|
650 |
for (fs::path::iterator j = boost::next(file_path->begin()); |
650 |
for (fs::path::iterator j = boost::next(file_path->begin()); |