summaryrefslogtreecommitdiff
path: root/src/BtFileAllocationEntry.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2017-05-20 22:19:29 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2017-05-20 22:19:29 +0900
commit3cfea3c724f917869730b19f09f7161251aa3155 (patch)
tree092d73f64af98b1cbe65861f7c69d2a41a12ecd1 /src/BtFileAllocationEntry.cc
parent8785342f8555992327f1ab0f7060c7e69dde5fd2 (diff)
Fix regression in bfc54d0b9a694e5d87efd8ed11b5393bc4b66f93
Don't save control file if --auto-save-interval is 0.
Diffstat (limited to 'src/BtFileAllocationEntry.cc')
-rw-r--r--src/BtFileAllocationEntry.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/BtFileAllocationEntry.cc b/src/BtFileAllocationEntry.cc
index c026e296..8ef15265 100644
--- a/src/BtFileAllocationEntry.cc
+++ b/src/BtFileAllocationEntry.cc
@@ -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 {