one more storage initialization fix

This commit is contained in:
Arvid Norberg 2011-02-12 22:48:21 +00:00
parent 6780114937
commit d35b0a8a7b
1 changed files with 1 additions and 1 deletions

View File

@ -553,7 +553,7 @@ namespace libtorrent
// if the file already exists, but is larger than what
// it's supposed to be, also truncate it
// if the file is empty, just create it either way.
if ((ec && allocate_files) || s.file_size > file_iter->size || file_iter->size == 0)
if ((ec && allocate_files) || (!ec && s.file_size > file_iter->size) || file_iter->size == 0)
{
ec.clear();
boost::intrusive_ptr<file> f = open_file(file_iter, file::read_write, ec);