summaryrefslogtreecommitdiff
path: root/src/session.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-10-31 04:17:40 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-10-31 04:17:40 -0400
commit97a9b42b2c5ef908e0c47ecfd39771a79f8fa8a2 (patch)
tree8eadb82cc54e66353e05309fe42c2900b93628bf /src/session.cc
parenta2cb549b1dff9024e3f700203e424e496b25fd91 (diff)
parenta0a980b9f4ebf1493682ecf1eb745bf52649aac5 (diff)
downloadfork-ledger-97a9b42b2c5ef908e0c47ecfd39771a79f8fa8a2.tar.gz
fork-ledger-97a9b42b2c5ef908e0c47ecfd39771a79f8fa8a2.tar.bz2
fork-ledger-97a9b42b2c5ef908e0c47ecfd39771a79f8fa8a2.zip
Merge branch 'next'
Diffstat (limited to 'src/session.cc')
-rw-r--r--src/session.cc8
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);
}