diff options
author | John Wiegley <johnw@newartisans.com> | 2009-10-29 00:52:51 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-10-29 00:52:51 -0400 |
commit | 55f5868380a4917028365256abcfd6d0b5f0a1e4 (patch) | |
tree | 57397e284628ad0a219d3c4948482a756ba19a3b /src/session.cc | |
parent | 2b2ffb7787df634aee1681dac7be48e986d34337 (diff) | |
download | fork-ledger-55f5868380a4917028365256abcfd6d0b5f0a1e4.tar.gz fork-ledger-55f5868380a4917028365256abcfd6d0b5f0a1e4.tar.bz2 fork-ledger-55f5868380a4917028365256abcfd6d0b5f0a1e4.zip |
Setting --date-format in ~/.ledgerrc works again
Diffstat (limited to 'src/session.cc')
-rw-r--r-- | src/session.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/session.cc b/src/session.cc index 2e728dd6..ea9ae180 100644 --- a/src/session.cc +++ b/src/session.cc @@ -94,13 +94,14 @@ session_t::session_t() std::size_t session_t::read_journal(std::istream& in, const path& pathname, - account_t * master) + account_t * master, + scope_t * scope) { if (! master) master = journal->master; - std::size_t count = journal->parse(in, *this, master, &pathname, - HANDLED(strict)); + std::size_t count = journal->parse(in, scope ? *scope : *this, + master, &pathname, HANDLED(strict)); // remove calculated totals and flags clean_posts(); @@ -110,13 +111,14 @@ std::size_t session_t::read_journal(std::istream& in, } std::size_t session_t::read_journal(const path& pathname, - account_t * master) + account_t * master, + scope_t * scope) { if (! exists(pathname)) throw_(std::logic_error, _("Cannot read file '%1'") << pathname); ifstream stream(pathname); - return read_journal(stream, pathname, master); + return read_journal(stream, pathname, master, scope); } std::size_t session_t::read_data(const string& master_account) |