diff options
author | John Wiegley <johnw@newartisans.com> | 2004-09-23 07:05:03 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-09-23 07:05:03 -0400 |
commit | be18ab2f1a7e413a70b37ddf388050da447d0bf4 (patch) | |
tree | 516d4c2e5243a13784595e4be12ef969ac88b6d1 /config.cc | |
parent | c57a2e74b877eeca2361a5e8412ae9866541634c (diff) | |
download | fork-ledger-be18ab2f1a7e413a70b37ddf388050da447d0bf4.tar.gz fork-ledger-be18ab2f1a7e413a70b37ddf388050da447d0bf4.tar.bz2 fork-ledger-be18ab2f1a7e413a70b37ddf388050da447d0bf4.zip |
more error checking and robustness mods
Diffstat (limited to 'config.cc')
-rw-r--r-- | config.cc | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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"); } |