]> granicus.if.org Git - apache/commitdiff
This file will go away. For this moment, the s/FindFirstFile/apr_stat/
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 1 Feb 2001 15:58:09 +0000 (15:58 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 1 Feb 2001 15:58:09 +0000 (15:58 +0000)
  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

os/win32/util_win32.c

index f7346c123c58f9c4b18b2de99e0cb5497de43d74..ca56879cb692157f2a79f96f8e474b74bf53ab04 100644 (file)
@@ -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');
             }
         }