summaryrefslogtreecommitdiff
path: root/src/context.h
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2013-02-02 15:59:46 -0700
committerCraig Earls <enderw88@gmail.com>2013-02-02 15:59:46 -0700
commit595a8afa44ad3f30995556fbee36ac16024e7c23 (patch)
tree8e86fa5e869bbfda45c069a73458ae28b728578d /src/context.h
parent01b8416f240ab7070f62a9f38b9cd575d1fa6056 (diff)
downloadfork-ledger-595a8afa44ad3f30995556fbee36ac16024e7c23.tar.gz
fork-ledger-595a8afa44ad3f30995556fbee36ac16024e7c23.tar.bz2
fork-ledger-595a8afa44ad3f30995556fbee36ac16024e7c23.zip
Fixes bug 377. Ledger now complains if it is given only a directory as input.
Diffstat (limited to 'src/context.h')
-rw-r--r--src/context.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/context.h b/src/context.h
index 9fe0613b..fd3575ab 100644
--- a/src/context.h
+++ b/src/context.h
@@ -117,7 +117,7 @@ inline parse_context_t open_for_reading(const path& pathname,
#else
filename = filesystem::complete(filename, cwd);
#endif
- if (! exists(filename))
+ if (! exists(filename) || is_directory(filename))
throw_(std::runtime_error,
_f("Cannot read journal file %1%") % filename);