fixed padding file and resume data bug
This commit is contained in:
@@ -187,6 +187,11 @@ namespace libtorrent
|
|||||||
{
|
{
|
||||||
size_type size = 0;
|
size_type size = 0;
|
||||||
std::time_t time = 0;
|
std::time_t time = 0;
|
||||||
|
if (i->pad_file)
|
||||||
|
{
|
||||||
|
sizes.push_back(std::make_pair(i->size, time));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
#if TORRENT_USE_WPATH
|
#if TORRENT_USE_WPATH
|
||||||
fs::wpath f = convert_to_wstring((p / i->path).string());
|
fs::wpath f = convert_to_wstring((p / i->path).string());
|
||||||
#elif TORRENT_USE_LOCALE_FILENAMES
|
#elif TORRENT_USE_LOCALE_FILENAMES
|
||||||
@@ -873,7 +878,7 @@ namespace libtorrent
|
|||||||
for (file_storage::iterator i = files().begin()
|
for (file_storage::iterator i = files().begin()
|
||||||
, end(files().end()); i != end; ++i, ++fs)
|
, end(files().end()); i != end; ++i, ++fs)
|
||||||
{
|
{
|
||||||
if (i->size != fs->first)
|
if (!i->pad_file && i->size != fs->first)
|
||||||
{
|
{
|
||||||
error = "file size for '" + i->path.external_file_string()
|
error = "file size for '" + i->path.external_file_string()
|
||||||
+ "' was expected to be "
|
+ "' was expected to be "
|
||||||
|
Reference in New Issue
Block a user