MCPcopy Create free account
hub / github.com/apache/httpd / test_iffile_section

Function test_iffile_section

server/core.c:2914–2928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2912}
2913
2914static int test_iffile_section(cmd_parms *cmd, const char *arg)
2915{
2916 const char *relative;
2917 apr_finfo_t sb;
2918
2919 /*
2920 * At least on Windows, if the path we are testing is not valid (for example
2921 * a path on a USB key that is not plugged), 'ap_server_root_relative()' will
2922 * return NULL. In such a case, consider that the file is not there and that
2923 * the section should be skipped.
2924 */
2925 relative = ap_server_root_relative(cmd->temp_pool, arg);
2926 return (relative &&
2927 (apr_stat(&sb, relative, APR_FINFO_TYPE, cmd->temp_pool) == APR_SUCCESS));
2928}
2929
2930static int test_ifdirective_section(cmd_parms *cmd, const char *arg)
2931{

Callers

nothing calls this directly

Calls 1

ap_server_root_relativeFunction · 0.85

Tested by

no test coverage detected