diff options
Diffstat (limited to 'src/FileAllocationCommand.cc')
| -rw-r--r-- | src/FileAllocationCommand.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/FileAllocationCommand.cc b/src/FileAllocationCommand.cc index 04bcc377..eeb85a96 100644 --- a/src/FileAllocationCommand.cc +++ b/src/FileAllocationCommand.cc @@ -76,14 +76,11 @@ bool FileAllocationCommand::executeInternal() } getDownloadEngine()->getFileAllocationMan()->dropPickedEntry(); - std::vector<Command*> commands; - try { - _fileAllocationEntry->prepareForNextAction(commands, getDownloadEngine()); - } catch(RecoverableException& e) { - std::for_each(commands.begin(), commands.end(), Deleter()); - throw; - } - getDownloadEngine()->addCommand(commands); + std::vector<Command*>* commands = new std::vector<Command*>(); + auto_delete_container<std::vector<Command*> > commandsDel(commands); + _fileAllocationEntry->prepareForNextAction(*commands, getDownloadEngine()); + getDownloadEngine()->addCommand(*commands); + commands->clear(); getDownloadEngine()->setNoWait(true); return true; } else { |
