From 8093185a4b0e7bfcc9e8c91c8e7284c658639ae3 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Thu, 31 May 2007 22:04:51 +0000 Subject: [PATCH] lt storage fix --- libtorrent/src/storage.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/libtorrent/src/storage.cpp b/libtorrent/src/storage.cpp index 4e4e3e1c7..dc0371d73 100755 --- a/libtorrent/src/storage.cpp +++ b/libtorrent/src/storage.cpp @@ -1612,12 +1612,16 @@ namespace libtorrent { m_unallocated_slots.push_back(i); } - - if (m_compact_mode || m_unallocated_slots.empty()) + if (m_unallocated_slots.empty()) { m_state = state_finished; return true; } + if (m_compact_mode) + { + m_state = state_create_files; + return false; + } } m_current_slot = 0; @@ -1662,15 +1666,9 @@ namespace libtorrent if (m_state == state_allocating) { - if (m_compact_mode) + if (m_compact_mode || m_unallocated_slots.empty()) { - m_state = state_finished; - return std::make_pair(true, 1.f); - } - - if (m_unallocated_slots.empty()) - { - m_state = state_finished; + m_state = state_create_files; return std::make_pair(true, 1.f); }