summaryrefslogtreecommitdiff
path: root/file_io/win32
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2020-01-16 19:20:29 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2020-01-16 19:20:29 +0000
commitf67e21c546c21896ab458bd9d88c78f30f962b11 (patch)
treec43effbf22595081593d61526922f4896a4720b7 /file_io/win32
parent8e5105f51e80b40ebf29e9cf197778d7d78adeb3 (diff)
downloadapr-f67e21c546c21896ab458bd9d88c78f30f962b11.tar.gz
Be more forceful in identifying EBADPATH
Even when the path is first identified as a wildcard path. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1872893 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/win32')
-rw-r--r--file_io/win32/filestat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/file_io/win32/filestat.c b/file_io/win32/filestat.c
index 45dd7604d..38fb2dc4f 100644
--- a/file_io/win32/filestat.c
+++ b/file_io/win32/filestat.c
@@ -32,6 +32,8 @@
*/
static apr_status_t test_safe_name(const char *name)
{
+ apr_status_t rv = APR_SUCCESS;
+
/* Only accept ':' in the second position of the filename,
* as the drive letter delimiter:
*/
@@ -41,13 +43,13 @@ static apr_status_t test_safe_name(const char *name)
while (*name) {
if (!IS_FNCHAR(*name) && (*name != '\\') && (*name != '/')) {
if (*name == '?' || *name == '*')
- return APR_EPATHWILD;
+ rv = APR_EPATHWILD;
else
return APR_EBADPATH;
}
++name;
}
- return APR_SUCCESS;
+ return rv;
}
static apr_status_t free_localheap(void *heap) {