From: William A. Rowe Jr Date: Thu, 1 Feb 2001 15:58:09 +0000 (+0000) Subject: This file will go away. For this moment, the s/FindFirstFile/apr_stat/ X-Git-Tag: APACHE_2_0_BETA_CANDIDATE_1~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bbb6109301bba1f85c01a93c59270641982af3cf;p=apache This file will go away. For this moment, the s/FindFirstFile/apr_stat/ fixes parsing of utf-8 resources against the NTFS filesystem. The only remaining utf-8 change is to the config parser [which is simple - any unicode config file (FFFE/FEFF lead word) will be utf-8 encrypted]. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87946 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/os/win32/util_win32.c b/os/win32/util_win32.c index f7346c123c..ca56879cb6 100644 --- a/os/win32/util_win32.c +++ b/os/win32/util_win32.c @@ -94,8 +94,6 @@ AP_DECLARE(char *) ap_os_systemcase_filename(apr_pool_t *pPool, char *p, *q, *t; BOOL bDone = FALSE; BOOL bFileExists = TRUE; - HANDLE hFind; - WIN32_FIND_DATA wfd; if (!szFile || strlen(szFile) == 0 || strlen(szFile) >= sizeof(buf)) return apr_pstrdup(pPool, ""); @@ -178,18 +176,15 @@ AP_DECLARE(char *) ap_os_systemcase_filename(apr_pool_t *pPool, * Note: in the call to OnlyDots, we may have to skip * a leading slash. */ - if (bFileExists && !OnlyDots((*q == '.' ? q : q+1))) { - hFind = FindFirstFile(pInputName, &wfd); - - if (hFind == INVALID_HANDLE_VALUE) { + if (bFileExists && !OnlyDots((*q == '.' ? q : q+1))) { + apr_finfo_t fs; + if (apr_stat(&fs, pInputName, APR_FINFO_NAME, pPool) != APR_SUCCESS) { bFileExists = FALSE; } else { - FindClose(hFind); - if (*q == '\\') *(t++) = '\\'; - t = strchr(strcpy(t, wfd.cFileName), '\0'); + t = strchr(strcpy(t, fs.name), '\0'); } }