Ignore:
Timestamp:
Jun 12, 2010, 8:14:08 PM (11 years ago)
Author:
Peter Johansson
Message:

fixes #454. fail if config file is directory rather than require it's a regular file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/Parameter.cc

    r1085 r1091  
    114114      check_readable(config_file_.value());
    115115      stat(config_file_.value().c_str(), &nodestat);
    116       if (!S_ISREG(nodestat.st_mode)) {
     116      if (S_ISDIR(nodestat.st_mode)) {
    117117        std::stringstream ss;
    118118        ss << cmd_.program_name() << ": `" << config_file_.value()
    119            << "' is not a regular file";
     119           << "' is a directory";
    120120        throw yat::utility::cmd_error(ss.str());
    121121      }
Note: See TracChangeset for help on using the changeset viewer.