com php-src: intergarte furher newer flag in FindFirstFileEx for win7+ only: win32/readdir.c

[email protected] (Anatol Belski)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    528468579b002ff17e3c38d9330da67749fd85ec
Author:    Anatol Belski <[email protected]>         Sun, 9 Apr 2017 18:14:10 +0200
Parents:   e24dcf97f1af7165d14ff3f57f21c7c89225e1f7
Branches:  master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=528468579b002ff17e3c38d9330da67749fd85ec

Log:
intergarte furher newer flag in FindFirstFileEx for win7+ only

Changed paths:
  M  win32/readdir.c


Diff:
diff --git a/win32/readdir.c b/win32/readdir.c
index 6cde75f..93ece88 100644
--- a/win32/readdir.c
+++ b/win32/readdir.c
@@ -62,7 +62,7 @@ DIR *opendir(const char *dir)
 		filespecw[index] = L'\0';
 	wcscat(filespecw, L"\\*");
 
-	if ((handle = FindFirstFileExW(filespecw, FindExInfoBasic, &(dp->fileinfo), FindExSearchNameMatch, NULL, 0)) == INVALID_HANDLE_VALUE) {
+	if ((handle = FindFirstFileExW(filespecw, FindExInfoBasic, &(dp->fileinfo), FindExSearchNameMatch, NULL, FIND_FIRST_EX_LARGE_FETCH)) == INVALID_HANDLE_VALUE) {
 		DWORD err = GetLastError();
 		if (err == ERROR_NO_MORE_FILES || err == ERROR_FILE_NOT_FOUND) {
 			dp->finished = 1;
@@ -201,7 +201,7 @@ int rewinddir(DIR *dp)
 		filespecw[index] = L'\0';
 	wcscat(filespecw, L"/*");
 
-	if ((handle = FindFirstFileExW(filespecw, FindExInfoBasic, &(dp->fileinfo), FindExSearchNameMatch, NULL, 0)) == INVALID_HANDLE_VALUE) {
+	if ((handle = FindFirstFileExW(filespecw, FindExInfoBasic, &(dp->fileinfo), FindExSearchNameMatch, NULL, FIND_FIRST_EX_LARGE_FETCH)) == INVALID_HANDLE_VALUE) {
 		dp->finished = 1;
 	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.