summaryrefslogtreecommitdiffstats
path: root/server/core.c
diff options
context:
space:
mode:
authorEric Covener <covener@apache.org>2020-04-11 20:47:46 +0200
committerEric Covener <covener@apache.org>2020-04-11 20:47:46 +0200
commitbb65d8c78077c735f001bac25592469160fa6204 (patch)
tree694e48849ba828e7084024ba7cb5e2970f5aded3 /server/core.c
parentfr doc rebuild. (diff)
downloadapache2-bb65d8c78077c735f001bac25592469160fa6204.tar.xz
apache2-bb65d8c78077c735f001bac25592469160fa6204.zip
Issue a warning for non-existent directories when running configtest
Submitted By: Stéphane Blondon <stephane.blondon gmail.com> Committed By: covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876402 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/core.c')
-rw-r--r--server/core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/core.c b/server/core.c
index 3a00761b76..1b6c98251a 100644
--- a/server/core.c
+++ b/server/core.c
@@ -2532,6 +2532,7 @@ static const char *dirsection(cmd_parms *cmd, void *mconfig, const char *arg)
}
else if (strcmp(cmd->path, "/") != 0)
{
+ int run_mode = ap_state_query(AP_SQ_RUN_MODE);
char *newpath;
/*
@@ -2544,6 +2545,14 @@ static const char *dirsection(cmd_parms *cmd, void *mconfig, const char *arg)
"\"> path is invalid.", NULL);
}
+ if (run_mode == AP_SQ_RM_CONFIG_TEST &&
+ !ap_is_directory(cmd->temp_pool, cmd->path)) {
+ ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0,
+ cmd->temp_pool, APLOGNO(10234)
+ "Warning: <Directory \"%s\"> does not exist or is not a directory",
+ cmd->path);
+ }
+
cmd->path = newpath;
if (cmd->path[strlen(cmd->path) - 1] != '/')
cmd->path = apr_pstrcat(cmd->pool, cmd->path, "/", NULL);