* This *SHOULD* work for any level include.
* I really really really hate this file. -cparker
*/
- if (strcasecmp(buf1, "$INCLUDE") == 0) {
+ if ((strcasecmp(buf1, "$INCLUDE") == 0) ||
+ (strcasecmp(buf1, "$-INCLUDE") == 0)) {
t2 = getword(&ptr, buf2, sizeof(buf2));
value = cf_expand_variables(filename, lineno, this, buf, buf2);
} else
#endif
{ /* it was a normal file */
+ if (buf1[1] == '-') {
+ struct stat statbuf;
+
+ if (stat(value, &statbuf) < 0) {
+ DEBUG("WARNING: Not including file %s: %s", value, strerror(errno));
+ continue;
+ }
+ }
+
if (cf_file_include(value, this) < 0) {
return -1;
}