mirror of
https://github.com/aria2/aria2.git
synced 2025-01-08 11:01:38 +00:00
Always save control file if --force-save is given
This commit is contained in:
parent
41121e09f7
commit
de55569de5
@ -1144,8 +1144,9 @@ Advanced Options
|
||||
.. option:: --force-save[=true|false]
|
||||
|
||||
Save download with :option:`--save-session <--save-session>` option
|
||||
even if the download is completed or removed. This may be useful to
|
||||
save BitTorrent seeding which is recognized as completed state.
|
||||
even if the download is completed or removed. This option also saves
|
||||
control file in that situations. This may be useful to save
|
||||
BitTorrent seeding which is recognized as completed state.
|
||||
Default: ``false``
|
||||
|
||||
.. option:: --gid=<GID>
|
||||
|
@ -334,7 +334,8 @@ public:
|
||||
!group->getDownloadContext()->isChecksumVerificationNeeded()) {
|
||||
group->applyLastModifiedTimeToLocalFiles();
|
||||
group->reportDownloadFinished();
|
||||
if(group->allDownloadFinished()) {
|
||||
if(group->allDownloadFinished() &&
|
||||
!group->getOption()->getAsBool(PREF_FORCE_SAVE)) {
|
||||
group->removeControlFile();
|
||||
saveSignature(group);
|
||||
} else {
|
||||
@ -517,11 +518,10 @@ void RequestGroupMan::fillRequestGroupFromReserver(DownloadEngine* e)
|
||||
|
||||
void RequestGroupMan::save()
|
||||
{
|
||||
for(RequestGroupList::iterator itr = requestGroups_.begin(),
|
||||
eoi = requestGroups_.end(); itr != eoi; ++itr) {
|
||||
const std::shared_ptr<RequestGroup>& rg = *itr;
|
||||
for(auto& rg : requestGroups_) {
|
||||
if(rg->allDownloadFinished() &&
|
||||
!rg->getDownloadContext()->isChecksumVerificationNeeded()) {
|
||||
!rg->getDownloadContext()->isChecksumVerificationNeeded() &&
|
||||
!rg->getOption()->getAsBool(PREF_FORCE_SAVE)) {
|
||||
rg->removeControlFile();
|
||||
} else {
|
||||
try {
|
||||
|
@ -921,8 +921,10 @@
|
||||
#define TEXT_FORCE_SAVE \
|
||||
_(" --force-save[=true|false] Save download with --save-session option even\n" \
|
||||
" if the download is completed or removed. This\n" \
|
||||
" may be useful to save BitTorrent seeding which\n" \
|
||||
" is recognized as completed state.")
|
||||
" option also saves control file in that\n" \
|
||||
" situations. This may be useful to save\n" \
|
||||
" BitTorrent seeding which is recognized as\n" \
|
||||
" completed state.")
|
||||
#define TEXT_DISK_CACHE \
|
||||
_(" --disk-cache=SIZE Enable disk cache. If SIZE is 0, the disk cache\n" \
|
||||
" is disabled. This feature caches the downloaded\n" \
|
||||
|
Loading…
Reference in New Issue
Block a user