diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-06 16:17:30 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-06 16:17:30 -0500 |
commit | 3f00f8362c2fdfae1dbb6517bc29c75e308bc4f0 (patch) | |
tree | 8e4d76de45eeaa40b51568142107bee2a0a235a1 /src/session.cc | |
parent | f03d386013f220e5b88a056c514c20319c83e9e7 (diff) | |
download | fork-ledger-3f00f8362c2fdfae1dbb6517bc29c75e308bc4f0.tar.gz fork-ledger-3f00f8362c2fdfae1dbb6517bc29c75e308bc4f0.tar.bz2 fork-ledger-3f00f8362c2fdfae1dbb6517bc29c75e308bc4f0.zip |
Don't use archive_t if boost_serialization unavailable
Diffstat (limited to 'src/session.cc')
-rw-r--r-- | src/session.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/session.cc b/src/session.cc index 378d12c7..9fb8df46 100644 --- a/src/session.cc +++ b/src/session.cc @@ -99,6 +99,7 @@ std::size_t session_t::read_data(const string& master_account) if (HANDLED(price_db_)) price_db_path = resolve_path(HANDLER(price_db_).str()); +#if defined(HAVE_BOOST_SERIALIZATION) optional<archive_t> cache; if (HANDLED(cache_) && master_account.empty()) cache = archive_t(HANDLED(cache_).str()); @@ -106,6 +107,7 @@ std::size_t session_t::read_data(const string& master_account) if (! (cache && cache->should_load(HANDLER(file_).data_files) && cache->load(journal))) { +#endif // HAVE_BOOST_SERIALIZATION if (price_db_path) { if (exists(*price_db_path)) { if (journal->read(*price_db_path) > 0) @@ -139,9 +141,11 @@ std::size_t session_t::read_data(const string& master_account) assert(xact_count == journal->xacts.size()); +#if defined(HAVE_BOOST_SERIALIZATION) if (cache && cache->should_save(journal)) cache->save(journal); } +#endif // HAVE_BOOST_SERIALIZATION if (populated_data_files) HANDLER(file_).data_files.clear(); |