Fixes bug 377. Ledger now complains if it is given only a directory as input.

This commit is contained in:
Craig Earls 2013-02-02 15:59:46 -07:00
parent 01b8416f24
commit 595a8afa44

View file

@ -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);