summaryrefslogtreecommitdiff
path: root/src/DownloadEngine.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2006-03-01 02:26:29 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2006-03-01 02:26:29 +0000
commitbc1cf6ed2d4c7ef52263a781359a73edb546970d (patch)
tree53e682f047a0465761b415708669b27cc981ce33 /src/DownloadEngine.cc
parentd770d1c40af48bb8f288b3ee4c9670289d9c2e45 (diff)
* AbstractCommand.cc:
* DownloadCommand.{h, cc}: Aborted downloading commands now properly unregister its cuid from SegmentMan. * DownloadEngine.cc: .aria2 file was written when a downloading failed with errors.
Diffstat (limited to 'src/DownloadEngine.cc')
-rw-r--r--src/DownloadEngine.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/DownloadEngine.cc b/src/DownloadEngine.cc
index ff38fa17..965699d0 100644
--- a/src/DownloadEngine.cc
+++ b/src/DownloadEngine.cc
@@ -78,11 +78,12 @@ void DownloadEngine::run() {
}
}
- segmentMan->removeIfFinished();
diskWriter->closeFile();
if(segmentMan->finished()) {
+ segmentMan->remove();
cout << "\nThe download was complete. <" << segmentMan->getFilePath() << ">" << endl;
} else {
+ segmentMan->save();
cout << "\nThe download was not complete because of errors. Check the log." << endl;
}
}