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