From 6555f45c9d85a100614843c89d091240f70b3de6 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 14 Aug 2008 02:15:11 -0400 Subject: Moved a block of code from report to session, though it's still commented out. --- src/session.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/session.h') diff --git a/src/session.h b/src/session.h index bd948bc8..5d8054d4 100644 --- a/src/session.h +++ b/src/session.h @@ -226,7 +226,21 @@ See LICENSE file included with the distribution for details and disclaimer.\n"; if (data_file.empty()) { data_file = args[0].as_string(); use_cache = false; + +#if 0 + // jww (2008-08-14): Should we check whether the file exists + // before we accept it, or is this done later on? + if (! data_file.string() == "-") { + std::string path = resolve_path(optarg); + if (access(path.c_str(), R_OK) != -1) + config->data_file = path; + else + throw_(std::invalid_argument, + "The ledger file '" << path << "' does not exist or is not readable"); + } +#endif } + return true; } }; -- cgit v1.2.3