diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-06-10 08:29:56 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-06-10 08:29:56 +0000 |
| commit | 649830316ee3b7588f54cd6a95b22e997e39a3ed (patch) | |
| tree | 1f6f71217b26709c4d96777987d2c811ca087b70 /src | |
| parent | d5bb035642ed1402eea53ecc5a4a1fd4d104c08f (diff) | |
Fixed the bug that caused -c command-line option did not work properly.
Diffstat (limited to 'src')
| -rw-r--r-- | src/RequestGroup.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/RequestGroup.cc b/src/RequestGroup.cc index a908f794..286a4c25 100644 --- a/src/RequestGroup.cc +++ b/src/RequestGroup.cc @@ -164,6 +164,7 @@ void RequestGroup::loadAndOpenFile() } initBitfield(); openExistingFile(); + _segmentMan->markPieceDone(existingFile.size()); } else { shouldCancelDownloadForSafety(); initBitfield(); @@ -205,7 +206,7 @@ void RequestGroup::prepareForNextAction(int cuid, const RequestHandle& req, Down CheckIntegrityCommand* command = new CheckIntegrityCommand(cuid, this, e, entry); e->commands.push_back(command); } else if(needsFileAllocation()) { - FileAllocationEntryHandle entry = new FileAllocationEntry(cuid, req, this); + FileAllocationEntryHandle entry = new FileAllocationEntry(cuid, req, this, existingFile.size()); entry->setNextDownloadCommand(downloadCommand); e->_fileAllocationMan->pushFileAllocationEntry(entry); } else { |
