summaryrefslogtreecommitdiff
path: root/config.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-09-23 07:05:03 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-09-23 07:05:03 -0400
commitbe18ab2f1a7e413a70b37ddf388050da447d0bf4 (patch)
tree516d4c2e5243a13784595e4be12ef969ac88b6d1 /config.cc
parentc57a2e74b877eeca2361a5e8412ae9866541634c (diff)
downloadfork-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.cc6
1 files changed, 3 insertions, 3 deletions
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");
}