diff options
author | Johann Klähn <kljohann@gmail.com> | 2013-01-08 23:20:08 +0100 |
---|---|---|
committer | Johann Klähn <kljohann@gmail.com> | 2013-01-15 23:03:39 +0100 |
commit | 0a1ff035421d5f97675ad769a7fcdbc68399f3dc (patch) | |
tree | 4428c1373ad3c9941c21cb613d56768d8194a0b3 /src/error.cc | |
parent | a633bc7fcedfecb0da557a19866e6e9bca131e6a (diff) | |
download | fork-ledger-0a1ff035421d5f97675ad769a7fcdbc68399f3dc.tar.gz fork-ledger-0a1ff035421d5f97675ad769a7fcdbc68399f3dc.tar.bz2 fork-ledger-0a1ff035421d5f97675ad769a7fcdbc68399f3dc.zip |
fix bug 788: behaviour of source_context for '-f -'
`session_t::read_data` did not set context.pathname to `/dev/stdin`
for the special case `-f -`. I chose to adjust `source_context` too
as there is no sensible context if no file name is provided.
Diffstat (limited to 'src/error.cc')
-rw-r--r-- | src/error.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/error.cc b/src/error.cc index 58339db7..d7e92daa 100644 --- a/src/error.cc +++ b/src/error.cc @@ -84,7 +84,7 @@ string source_context(const path& file, const string& prefix) { const std::streamoff len = end_pos - pos; - if (! len || file == path("/dev/stdin")) + if (! len || file == path("/dev/stdin") || file.empty()) return _("<no source context>"); assert(len > 0); |