Don't add price_db to sources if it doesn't exist
This commit is contained in:
parent
e1c419b6be
commit
a0a980b9f4
1 changed files with 5 additions and 3 deletions
|
|
@ -146,9 +146,11 @@ std::size_t session_t::read_data(const string& master_account)
|
|||
cache->should_load(HANDLER(file_).data_files) &&
|
||||
cache->load(journal))) {
|
||||
if (price_db_path) {
|
||||
if (exists(*price_db_path) && read_journal(*price_db_path) > 0)
|
||||
throw_(parse_error, _("Transactions not allowed in price history file"));
|
||||
journal->sources.push_back(journal_t::fileinfo_t(*price_db_path));
|
||||
if (exists(*price_db_path)) {
|
||||
if (read_journal(*price_db_path) > 0)
|
||||
throw_(parse_error, _("Transactions not allowed in price history file"));
|
||||
journal->sources.push_back(journal_t::fileinfo_t(*price_db_path));
|
||||
}
|
||||
HANDLER(file_).data_files.remove(*price_db_path);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue