diff --git a/docs/make_torrent.rst b/docs/make_torrent.rst index b0286dc45..42dceed7a 100644 --- a/docs/make_torrent.rst +++ b/docs/make_torrent.rst @@ -319,7 +319,8 @@ piece_size will be calculated such that the torrent file is roughly 40 kB. If a ``pad_size_limit`` is specified (other than -1), any file larger than the specified number of bytes will be preceeded by a pad file to align it with the start of a piece. The pad_file_limit is ignored unless the -``optimize`` flag is passed. +``optimize`` flag is passed. Typically it doesn't make sense to set this +any lower than 4kiB. The overload that takes a ``torrent_info`` object will make a verbatim copy of its info dictionary (to preserve the info-hash). The copy of diff --git a/src/file_storage.cpp b/src/file_storage.cpp index a8e88aeec..fde7f8f76 100644 --- a/src/file_storage.cpp +++ b/src/file_storage.cpp @@ -540,7 +540,8 @@ namespace libtorrent i->offset = off; char name[30]; snprintf(name, sizeof(name), ".____padding_file/%d", padding_file); - i->set_name(name); + std::string path = combine_path(m_name, name); + i->set_name(path.c_str()); i->pad_file = true; off += pad_size; ++padding_file;