mirror of
https://github.com/aria2/aria2.git
synced 2025-01-04 00:53:19 +00:00
Fix regression in bfc54d0b9a
Don't save control file if --auto-save-interval is 0.
This commit is contained in:
parent
8785342f85
commit
3cfea3c724
@ -82,11 +82,13 @@ void BtFileAllocationEntry::prepareForNextAction(
|
||||
rg->createNextCommandWithAdj(commands, e, 0);
|
||||
}
|
||||
|
||||
try {
|
||||
rg->saveControlFile();
|
||||
}
|
||||
catch (RecoverableException& e) {
|
||||
A2_LOG_ERROR_EX(EX_EXCEPTION_CAUGHT, e);
|
||||
if (option->getAsInt(PREF_AUTO_SAVE_INTERVAL) != 0) {
|
||||
try {
|
||||
rg->saveControlFile();
|
||||
}
|
||||
catch (RecoverableException& e) {
|
||||
A2_LOG_ERROR_EX(EX_EXCEPTION_CAUGHT, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -99,7 +99,8 @@ void StreamFileAllocationEntry::prepareForNextAction(
|
||||
rg->createNextCommandWithAdj(commands, e, 0);
|
||||
}
|
||||
|
||||
if (!rg->allDownloadFinished()) {
|
||||
if (option->getAsInt(PREF_AUTO_SAVE_INTERVAL) != 0 &&
|
||||
!rg->allDownloadFinished()) {
|
||||
try {
|
||||
rg->saveControlFile();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user