From 9a99b755cbb517b45f2524415091fd1bf3bb4505 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 14 Jan 2005 23:55:22 +0000 Subject: [PATCH] *** empty log message *** --- main.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.cc b/main.cc index f5e7d2cf..292bef30 100644 --- a/main.cc +++ b/main.cc @@ -190,7 +190,10 @@ int parse_and_report(int argc, char * argv[], char * envp[]) } strings_list::iterator arg = args.begin(); - config.use_cache = config.data_file.empty() && config.price_db.empty(); + if (config.cache_file == "") + config.use_cache = false; + else + config.use_cache = config.data_file.empty() && config.price_db.empty(); DEBUG_PRINT("ledger.config.cache", "1. use_cache = " << config.use_cache); process_environment(config_options, envp, "LEDGER_"); @@ -218,8 +221,6 @@ int parse_and_report(int argc, char * argv[], char * envp[]) if (config.cache_file.empty()) config.cache_file = home + "/.ledger-cache"; - else if (config.cache_file == "") - config.cache_file = ""; if (config.data_file == config.cache_file) config.use_cache = false; @@ -400,8 +401,7 @@ def vmax(d, val):\n\ // Write out the binary cache, if need be - if (config.use_cache && config.cache_dirty && - ! config.cache_file.empty()) { + if (config.use_cache && config.cache_dirty && ! config.cache_file.empty()) { std::ofstream stream(config.cache_file.c_str()); write_binary_journal(stream, journal.get(), &journal->sources); }