diff options
author | John Wiegley <johnw@newartisans.com> | 2008-08-13 03:55:16 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-08-13 03:55:16 -0400 |
commit | 5f0b25ab9a33ee994c7db6841e60609e9b5d3a77 (patch) | |
tree | 4118a29bf8e2f6c2a5a6838cf0ce6cb383b2b13b /src | |
parent | f34763fe071cf613de060aef67c2a2476708ef92 (diff) | |
download | fork-ledger-5f0b25ab9a33ee994c7db6841e60609e9b5d3a77.tar.gz fork-ledger-5f0b25ab9a33ee994c7db6841e60609e9b5d3a77.tar.bz2 fork-ledger-5f0b25ab9a33ee994c7db6841e60609e9b5d3a77.zip |
The -f flag now works again.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cc | 2 | ||||
-rw-r--r-- | src/session.cc | 2 | ||||
-rw-r--r-- | src/session.h | 9 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/main.cc b/src/main.cc index b756b6e5..eeff5bb7 100644 --- a/src/main.cc +++ b/src/main.cc @@ -201,7 +201,7 @@ namespace ledger { if (! session.cache_file) session.use_cache = false; - else + else if (session.use_cache) session.use_cache = ! session.data_file.empty() && session.price_db; DEBUG("ledger.session.cache", "1. use_cache = " << session.use_cache); diff --git a/src/session.cc b/src/session.cc index 232773dc..4770ed3b 100644 --- a/src/session.cc +++ b/src/session.cc @@ -100,7 +100,7 @@ session_t::session_t() pricing_leeway(24 * 3600), download_quotes(false), - use_cache(false), + use_cache(true), cache_dirty(false), now(now), diff --git a/src/session.h b/src/session.h index 36da0a53..bd948bc8 100644 --- a/src/session.h +++ b/src/session.h @@ -221,8 +221,13 @@ See LICENSE file included with the distribution for details and disclaimer.\n"; value_t option_file_(call_scope_t& args) { assert(args.size() == 1); - data_file = args[0].as_string(); - return NULL_VALUE; + // jww (2008-08-13): Add support for multiple files, but not between + // -f and LEDGER_FILE + if (data_file.empty()) { + data_file = args[0].as_string(); + use_cache = false; + } + return true; } }; |