From be18ab2f1a7e413a70b37ddf388050da447d0bf4 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 23 Sep 2004 07:05:03 -0400 Subject: more error checking and robustness mods --- config.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'config.cc') diff --git a/config.cc b/config.cc index 65af5d3c..85c90427 100644 --- a/config.cc +++ b/config.cc @@ -187,8 +187,7 @@ void config_t::process_options(const std::string& command, // If downloading is to be supported, configure the updater if (! commodity_t::updater && download_quotes) - commodity_t::updater = new quotes_by_script(price_db, - pricing_leeway, + commodity_t::updater = new quotes_by_script(price_db, pricing_leeway, cache_dirty); if (! date_format.empty()) @@ -235,7 +234,8 @@ void parse_ledger_data(journal_t * journal, entry_count += parse_journal_file(config.data_file, journal, account); } - if (! config.price_db.empty()) + if (! config.price_db.empty() && + access(config.price_db.c_str(), R_OK) != -1) if (parse_journal_file(config.price_db, journal)) throw error("Entries not allowed in price history file"); } -- cgit v1.2.3