diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-06 02:07:56 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-06 02:07:56 -0500 |
commit | 05d0f1a17f9f4a9d659274d91dfb164055453637 (patch) | |
tree | ece58237ae3883aba0153ce32465acde09b2b4b5 /src/session.cc | |
parent | 61f7d1295fb427f75861e37856c3e403f7f98f39 (diff) | |
download | fork-ledger-05d0f1a17f9f4a9d659274d91dfb164055453637.tar.gz fork-ledger-05d0f1a17f9f4a9d659274d91dfb164055453637.tar.bz2 fork-ledger-05d0f1a17f9f4a9d659274d91dfb164055453637.zip |
The binary cache is working again
Diffstat (limited to 'src/session.cc')
-rw-r--r-- | src/session.cc | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/session.cc b/src/session.cc index afc092f1..0e03bbb3 100644 --- a/src/session.cc +++ b/src/session.cc @@ -75,7 +75,6 @@ session_t::session_t() std::size_t session_t::read_data(const string& master_account) { bool populated_data_files = false; - bool populated_price_db = false; if (HANDLER(file_).data_files.empty()) { path file; @@ -101,15 +100,9 @@ std::size_t session_t::read_data(const string& master_account) price_db_path = resolve_path(HANDLER(price_db_).str()); optional<archive_t> cache; - if (HANDLED(cache_) && master_account.empty()) { + if (HANDLED(cache_) && master_account.empty()) cache = archive_t(HANDLED(cache_).str()); - if (price_db_path) { - HANDLER(file_).data_files.push_back(*price_db_path); - populated_price_db = true; - } - } - if (! (cache && cache->should_load(HANDLER(file_).data_files) && cache->load(journal))) { @@ -118,7 +111,6 @@ std::size_t session_t::read_data(const string& master_account) if (journal->read(*price_db_path) > 0) throw_(parse_error, _("Transactions not allowed in price history file")); } - HANDLER(file_).data_files.remove(*price_db_path); } foreach (const path& pathname, HANDLER(file_).data_files) { @@ -153,8 +145,6 @@ std::size_t session_t::read_data(const string& master_account) if (populated_data_files) HANDLER(file_).data_files.clear(); - else if (populated_price_db) - HANDLER(file_).data_files.remove(*price_db_path); VERIFY(journal->valid()); |