added workaround for incorrectly encoded paths in torrent files
This commit is contained in:
@@ -944,13 +944,20 @@ torrent, all the files starts with a directory with the same name as <tt class="
|
||||
The filenames are encoded with UTF-8.</p>
|
||||
<p><tt class="docutils literal"><span class="pre">size</span></tt> is the size of the file (in bytes) and <tt class="docutils literal"><span class="pre">offset</span></tt> is the byte offset
|
||||
of the file within the torrent. i.e. the sum of all the sizes of the files
|
||||
before this one in the file list this one in the file list..</p>
|
||||
before this one in the file list this one in the file list.</p>
|
||||
<p><tt class="docutils literal"><span class="pre">orig_path</span></tt> is set to 0 in case the path element is an exact copy of that
|
||||
found in the metadata. In case the path in the original metadata was
|
||||
incorrectly encoded, and had to be fixed in order to be acceptable utf-8,
|
||||
the original string is preserved in <tt class="docutils literal"><span class="pre">orig_path</span></tt>. The reason to keep it
|
||||
is to be able to reproduce the info-section exactly, with the correct
|
||||
info-hash.</p>
|
||||
<pre class="literal-block">
|
||||
struct file_entry
|
||||
{
|
||||
boost::filesystem::path path;
|
||||
size_type offset;
|
||||
size_type size;
|
||||
boost::scoped_ptr<boost::filesystem::path> orig_path;
|
||||
};
|
||||
</pre>
|
||||
</div>
|
||||
|
@@ -854,7 +854,14 @@ The filenames are encoded with UTF-8.
|
||||
|
||||
``size`` is the size of the file (in bytes) and ``offset`` is the byte offset
|
||||
of the file within the torrent. i.e. the sum of all the sizes of the files
|
||||
before this one in the file list this one in the file list..
|
||||
before this one in the file list this one in the file list.
|
||||
|
||||
``orig_path`` is set to 0 in case the path element is an exact copy of that
|
||||
found in the metadata. In case the path in the original metadata was
|
||||
incorrectly encoded, and had to be fixed in order to be acceptable utf-8,
|
||||
the original string is preserved in ``orig_path``. The reason to keep it
|
||||
is to be able to reproduce the info-section exactly, with the correct
|
||||
info-hash.
|
||||
|
||||
::
|
||||
|
||||
@@ -863,6 +870,7 @@ before this one in the file list this one in the file list..
|
||||
boost::filesystem::path path;
|
||||
size_type offset;
|
||||
size_type size;
|
||||
boost::shared_ptr<boost::filesystem::path> orig_path;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -47,13 +47,13 @@ cvs -d:pserver:anonymous@boost.cvs.sourceforge.net:/cvsroot/boost login
|
||||
cvs -z3 -d:pserver:anonymous@boost.cvs.sourceforge.net:/cvsroot/boost checkout boost
|
||||
cvs -d:pserver:anonymous@boost.cvs.sourceforge.net:/cvsroot/boost logout
|
||||
|
||||
cvs -d:pserver:anonym...@libtorrent.cvs.sourceforge.net:/cvsroot/libtorrent login
|
||||
cvs -z3 -d:pserver:anonym...@libtorrent.cvs.sourceforge.net:/cvsroot/libtorrent co -P libtorrent
|
||||
cvs -d:pserver:anonym...@libtorrent.cvs.sourceforge.net:/cvsroot/libtorrent logout
|
||||
cvs -d:pserver:anonymous@libtorrent.cvs.sourceforge.net:/cvsroot/libtorrent login
|
||||
cvs -z3 -d:pserver:anonymous@libtorrent.cvs.sourceforge.net:/cvsroot/libtorrent co -P libtorrent
|
||||
cvs -d:pserver:anonymous@libtorrent.cvs.sourceforge.net:/cvsroot/libtorrent logout
|
||||
|
||||
cvs -d:pserver:anonym...@asio.cvs.sourceforge.net:/cvsroot/asio login
|
||||
cvs -z3 -d:pserver:anonym...@asio.cvs.sourceforge.net:/cvsroot/asio co -P asio
|
||||
cvs -d:pserver:anonym...@asio.cvs.sourceforge.net:/cvsroot/asio login
|
||||
cvs -d:pserver:anonymous@asio.cvs.sourceforge.net:/cvsroot/asio login
|
||||
cvs -z3 -d:pserver:anonymous@asio.cvs.sourceforge.net:/cvsroot/asio co -P asio
|
||||
cvs -d:pserver:anonymous@asio.cvs.sourceforge.net:/cvsroot/asio login
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="step-2-building-boost">
|
||||
|
@@ -30,13 +30,13 @@ by executing the following commands::
|
||||
cvs -z3 -d:pserver:anonymous@boost.cvs.sourceforge.net:/cvsroot/boost checkout boost
|
||||
cvs -d:pserver:anonymous@boost.cvs.sourceforge.net:/cvsroot/boost logout
|
||||
|
||||
cvs -d:pserver:anonym...@libtorrent.cvs.sourceforge.net:/cvsroot/libtorrent login
|
||||
cvs -z3 -d:pserver:anonym...@libtorrent.cvs.sourceforge.net:/cvsroot/libtorrent co -P libtorrent
|
||||
cvs -d:pserver:anonym...@libtorrent.cvs.sourceforge.net:/cvsroot/libtorrent logout
|
||||
cvs -d:pserver:anonymous@libtorrent.cvs.sourceforge.net:/cvsroot/libtorrent login
|
||||
cvs -z3 -d:pserver:anonymous@libtorrent.cvs.sourceforge.net:/cvsroot/libtorrent co -P libtorrent
|
||||
cvs -d:pserver:anonymous@libtorrent.cvs.sourceforge.net:/cvsroot/libtorrent logout
|
||||
|
||||
cvs -d:pserver:anonym...@asio.cvs.sourceforge.net:/cvsroot/asio login
|
||||
cvs -z3 -d:pserver:anonym...@asio.cvs.sourceforge.net:/cvsroot/asio co -P asio
|
||||
cvs -d:pserver:anonym...@asio.cvs.sourceforge.net:/cvsroot/asio login
|
||||
cvs -d:pserver:anonymous@asio.cvs.sourceforge.net:/cvsroot/asio login
|
||||
cvs -z3 -d:pserver:anonymous@asio.cvs.sourceforge.net:/cvsroot/asio co -P asio
|
||||
cvs -d:pserver:anonymous@asio.cvs.sourceforge.net:/cvsroot/asio login
|
||||
|
||||
Step 2: Building boost
|
||||
======================
|
||||
|
Reference in New Issue
Block a user