Changeset 708


Ignore:
Timestamp:
Nov 27, 2008, 12:20:25 AM (12 years ago)
Author:
Peter Johansson
Message:

refs #349. Fixed so svndigest complains about broken symlink for config file also when no argument was given at cmd, i.e., default file is a broken symlink

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/Parameter.cc

    r705 r708  
    136136
    137137    // check config file
    138     if (config_file_->present())
     138    struct stat nodestat;
     139    // true also if there is a broken symlink named...
     140    bool config_exists = !lstat(config_file_->value().c_str(), &nodestat);
     141    // the latter case in order to catch broken symlink
     142    if (config_file_->present() || config_exists)
     143      // throws if file does not exists
    139144      check_existence(config_file_->value());
    140     if (node_exist(config_file_->value())) {
     145    if (config_exists) {
     146      // throws if file is not readable
    141147      check_readable(config_file_->value());
    142       struct stat nodestat;
    143148      stat(config_file_->value().c_str(), &nodestat);
    144149      if (!S_ISREG(nodestat.st_mode)) {
Note: See TracChangeset for help on using the changeset viewer.