one more storage initialization fix
This commit is contained in:
parent
6780114937
commit
d35b0a8a7b
|
@ -553,7 +553,7 @@ namespace libtorrent
|
||||||
// if the file already exists, but is larger than what
|
// if the file already exists, but is larger than what
|
||||||
// it's supposed to be, also truncate it
|
// it's supposed to be, also truncate it
|
||||||
// if the file is empty, just create it either way.
|
// 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();
|
ec.clear();
|
||||||
boost::intrusive_ptr<file> f = open_file(file_iter, file::read_write, ec);
|
boost::intrusive_ptr<file> f = open_file(file_iter, file::read_write, ec);
|
||||||
|
|
Loading…
Reference in New Issue