From 6219c2e36c969446bfe20985498fa68330c30438 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 9 Apr 2009 17:36:05 +0000 Subject: [PATCH] fixed padding file and resume data bug --- src/storage.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/storage.cpp b/src/storage.cpp index f7a0f0ffb..7ed9a9dfa 100644 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -187,6 +187,11 @@ namespace libtorrent { size_type size = 0; std::time_t time = 0; + if (i->pad_file) + { + sizes.push_back(std::make_pair(i->size, time)); + continue; + } #if TORRENT_USE_WPATH fs::wpath f = convert_to_wstring((p / i->path).string()); #elif TORRENT_USE_LOCALE_FILENAMES @@ -873,7 +878,7 @@ namespace libtorrent for (file_storage::iterator i = files().begin() , 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() + "' was expected to be "