diff options
author | Ivan Zhakov <ivan@apache.org> | 2022-01-05 17:45:33 +0000 |
---|---|---|
committer | Ivan Zhakov <ivan@apache.org> | 2022-01-05 17:45:33 +0000 |
commit | 90f7b6937abc6b81ad460e2e4d0511233c9877de (patch) | |
tree | 205bedd20ce702f7065c4bb16116f8b448bbb3eb | |
parent | 424cfc2776caa9a2eb02d57ae26dbc503541fa32 (diff) | |
download | apr-90f7b6937abc6b81ad460e2e4d0511233c9877de.tar.gz |
Win32: Minor optimization of apr_stat() and apr_file_info_get().
* file_io/win32/filestat.c
(reparse_point_is_link, apr_stat): Use FindFirstFileExW(FindExInfoBasic)
instead of FindFirstFileW().
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1896724 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | file_io/win32/filestat.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/file_io/win32/filestat.c b/file_io/win32/filestat.c index 8eb349f12..bd39790c6 100644 --- a/file_io/win32/filestat.c +++ b/file_io/win32/filestat.c @@ -240,7 +240,8 @@ static int reparse_point_is_link(WIN32_FILE_ATTRIBUTE_DATA *wininfo, return 0; } - hFind = FindFirstFileW(wfname, &fd); + hFind = FindFirstFileExW(wfname, FindExInfoBasic, &fd, FindExSearchNameMatch, + NULL, 0); if (hFind == INVALID_HANDLE_VALUE) { return 0; } @@ -653,7 +654,8 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname, if ((rv = test_safe_name(fname)) != APR_SUCCESS) { return rv; } - hFind = FindFirstFileW(wfname, &FileInfo.w); + hFind = FindFirstFileExW(wfname, FindExInfoBasic, &FileInfo.w, + FindExSearchNameMatch, NULL, 0); if (hFind == INVALID_HANDLE_VALUE) return apr_get_os_error(); FindClose(hFind); |