Changeset 708
- Timestamp:
- Nov 27, 2008, 12:20:25 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/Parameter.cc
r705 r708 136 136 137 137 // 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 139 144 check_existence(config_file_->value()); 140 if (node_exist(config_file_->value())) { 145 if (config_exists) { 146 // throws if file is not readable 141 147 check_readable(config_file_->value()); 142 struct stat nodestat;143 148 stat(config_file_->value().c_str(), &nodestat); 144 149 if (!S_ISREG(nodestat.st_mode)) {
Note: See TracChangeset
for help on using the changeset viewer.