summaryrefslogtreecommitdiff
path: root/src/session.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/session.cc')
-rw-r--r--src/session.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/session.cc b/src/session.cc
index 7072fb09..632002d4 100644
--- a/src/session.cc
+++ b/src/session.cc
@@ -98,8 +98,12 @@ std::size_t session_t::read_data(const string& master_account)
acct = journal->find_account(master_account);
optional<path> price_db_path;
- if (HANDLED(price_db_))
+ if (HANDLED(price_db_)){
price_db_path = resolve_path(HANDLER(price_db_).str());
+ if (!exists(price_db_path.get())){
+ throw_(parse_error, _f("Could not find specified price file %1%") % price_db_path);
+ }
+ }
if (HANDLED(explicit))
journal->force_checking = true;
@@ -143,7 +147,7 @@ std::size_t session_t::read_data(const string& master_account)
}
foreach (const path& pathname, HANDLER(file_).data_files) {
- if (pathname == "-") {
+ if (pathname == "-" || pathname == "/dev/stdin") {
// To avoid problems with stdin and pipes, etc., we read the entire
// file in beforehand into a memory buffer, and then parcel it out
// from there.