diff options
author | ivan <ivan@13f79535-47bb-0310-9956-ffa450edef68> | 2022-01-05 17:45:33 +0000 |
---|---|---|
committer | ivan <ivan@13f79535-47bb-0310-9956-ffa450edef68> | 2022-01-05 17:45:33 +0000 |
commit | df4b87a52642f82fbbd05febedf0ba83a30a43f9 (patch) | |
tree | 205bedd20ce702f7065c4bb16116f8b448bbb3eb | |
parent | 28eca1f253eae6e9c88fe9ec51abfc58075dce1c (diff) | |
download | libapr-df4b87a52642f82fbbd05febedf0ba83a30a43f9.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); |