diff options
author | John Wiegley <johnw@newartisans.com> | 2009-10-31 04:15:29 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-10-31 04:15:29 -0400 |
commit | a0a980b9f4ebf1493682ecf1eb745bf52649aac5 (patch) | |
tree | 8eadb82cc54e66353e05309fe42c2900b93628bf /src/session.cc | |
parent | e1c419b6be940038ae2013104e934af20460213c (diff) | |
download | fork-ledger-a0a980b9f4ebf1493682ecf1eb745bf52649aac5.tar.gz fork-ledger-a0a980b9f4ebf1493682ecf1eb745bf52649aac5.tar.bz2 fork-ledger-a0a980b9f4ebf1493682ecf1eb745bf52649aac5.zip |
Don't add price_db to sources if it doesn't exist
Diffstat (limited to 'src/session.cc')
-rw-r--r-- | src/session.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/session.cc b/src/session.cc index b7fdf275..6efc03f2 100644 --- a/src/session.cc +++ b/src/session.cc @@ -146,9 +146,11 @@ std::size_t session_t::read_data(const string& master_account) cache->should_load(HANDLER(file_).data_files) && cache->load(journal))) { if (price_db_path) { - if (exists(*price_db_path) && read_journal(*price_db_path) > 0) - throw_(parse_error, _("Transactions not allowed in price history file")); - journal->sources.push_back(journal_t::fileinfo_t(*price_db_path)); + if (exists(*price_db_path)) { + if (read_journal(*price_db_path) > 0) + throw_(parse_error, _("Transactions not allowed in price history file")); + journal->sources.push_back(journal_t::fileinfo_t(*price_db_path)); + } HANDLER(file_).data_files.remove(*price_db_path); } |