{
apr_finfo_t src_finfo; /* finfo for source file */
apr_finfo_t dst_state_finfo; /* finfo for STATE directory */
+ apr_status_t rv;
const char *src;
const char *dst;
/* ### do we need to deal with the umask? */
/* ensure that it exists */
- if (apr_make_dir(dst, APR_OS_DEFAULT, p) != 0) {
- if (APR_STATUS_IS_EEXIST(errno)) {
+ rv = apr_make_dir(dst, APR_OS_DEFAULT, p);
+ if (rv != APR_SUCCESS) {
+ if (APR_STATUS_IS_EEXIST(rv)) {
/* ### use something besides 500? */
return dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
"Could not create internal state directory");
apr_snprintf(buf, sizeof(buf), "%sgprof.%d", dir, (int)getpid());
}
dir = ap_server_root_relative(pconf, buf[0] ? buf : dir);
- if(mkdir(dir, 0755) < 0 && !APR_ERROR_IS_EEXIST(errno)) {
+ if(mkdir(dir, 0755) < 0 && errno != EEXIST) {
ap_log_error(APLOG_MARK, APLOG_ERR, errno, ap_server_conf,
"gprof: error creating directory %s", dir);
}