Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
25e15ddb
Commit
25e15ddb
authored
Oct 18, 2007
by
Mikolaj Zalewski
Committed by
Alexandre Julliard
Oct 19, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: FindExSearchLimitToDirectories has no effect on FindFirstFileEx.
parent
1ae9a9d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
3 deletions
+41
-3
file.c
dlls/kernel32/file.c
+3
-3
file.c
dlls/kernel32/tests/file.c
+38
-0
No files found.
dlls/kernel32/file.c
View file @
25e15ddb
...
@@ -1544,6 +1544,9 @@ BOOL WINAPI ReplaceFileA(LPCSTR lpReplacedFileName,LPCSTR lpReplacementFileName,
...
@@ -1544,6 +1544,9 @@ BOOL WINAPI ReplaceFileA(LPCSTR lpReplacedFileName,LPCSTR lpReplacementFileName,
/*************************************************************************
/*************************************************************************
* FindFirstFileExW (KERNEL32.@)
* FindFirstFileExW (KERNEL32.@)
*
* NOTE: The FindExSearchLimitToDirectories is ignored - it gives the same
* results as FindExSearchNameMatch
*/
*/
HANDLE
WINAPI
FindFirstFileExW
(
LPCWSTR
filename
,
FINDEX_INFO_LEVELS
level
,
HANDLE
WINAPI
FindFirstFileExW
(
LPCWSTR
filename
,
FINDEX_INFO_LEVELS
level
,
LPVOID
data
,
FINDEX_SEARCH_OPS
search_op
,
LPVOID
data
,
FINDEX_SEARCH_OPS
search_op
,
...
@@ -1781,9 +1784,6 @@ BOOL WINAPI FindNextFileW( HANDLE handle, WIN32_FIND_DATAW *data )
...
@@ -1781,9 +1784,6 @@ BOOL WINAPI FindNextFileW( HANDLE handle, WIN32_FIND_DATAW *data )
{
{
if
(
!
check_dir_symlink
(
info
,
dir_info
))
continue
;
if
(
!
check_dir_symlink
(
info
,
dir_info
))
continue
;
}
}
if
(
info
->
search_op
==
FindExSearchLimitToDirectories
&&
(
dir_info
->
FileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
==
0
)
continue
;
data
->
dwFileAttributes
=
dir_info
->
FileAttributes
;
data
->
dwFileAttributes
=
dir_info
->
FileAttributes
;
data
->
ftCreationTime
=
*
(
FILETIME
*
)
&
dir_info
->
CreationTime
;
data
->
ftCreationTime
=
*
(
FILETIME
*
)
&
dir_info
->
CreationTime
;
...
...
dlls/kernel32/tests/file.c
View file @
25e15ddb
...
@@ -1377,6 +1377,43 @@ static void test_FindNextFileA(void)
...
@@ -1377,6 +1377,43 @@ static void test_FindNextFileA(void)
ok
(
err
==
ERROR_NO_MORE_FILES
,
"GetLastError should return ERROR_NO_MORE_FILES
\n
"
);
ok
(
err
==
ERROR_NO_MORE_FILES
,
"GetLastError should return ERROR_NO_MORE_FILES
\n
"
);
}
}
static
void
test_FindFirstFileExA
(
void
)
{
WIN32_FIND_DATAA
search_results
;
HANDLE
handle
;
CreateDirectoryA
(
"test-dir"
,
NULL
);
_lclose
(
_lcreat
(
"test-dir
\\
file1"
,
0
));
_lclose
(
_lcreat
(
"test-dir
\\
file2"
,
0
));
CreateDirectoryA
(
"test-dir
\\
dir1"
,
NULL
);
/* FindExLimitToDirectories is ignored */
handle
=
FindFirstFileExA
(
"test-dir
\\
*"
,
FindExInfoStandard
,
&
search_results
,
FindExSearchLimitToDirectories
,
NULL
,
0
);
ok
(
handle
!=
INVALID_HANDLE_VALUE
,
"FindFirstFile failed (err=%u)
\n
"
,
GetLastError
());
ok
(
strcmp
(
search_results
.
cFileName
,
"."
)
==
0
,
"First entry should be '.', is %s
\n
"
,
search_results
.
cFileName
);
#define CHECK_NAME(fn) (strcmp((fn), "file1") == 0 || strcmp((fn), "file2") == 0 || strcmp((fn), "dir1") == 0)
ok
(
FindNextFile
(
handle
,
&
search_results
),
"Fetching second file failed
\n
"
);
ok
(
strcmp
(
search_results
.
cFileName
,
".."
)
==
0
,
"Second entry should be '..' is %s
\n
"
,
search_results
.
cFileName
);
ok
(
FindNextFile
(
handle
,
&
search_results
),
"Fetching third file failed
\n
"
);
ok
(
CHECK_NAME
(
search_results
.
cFileName
),
"Invalid thrid entry - %s
\n
"
,
search_results
.
cFileName
);
ok
(
FindNextFile
(
handle
,
&
search_results
),
"Fetching fourth file failed
\n
"
);
ok
(
CHECK_NAME
(
search_results
.
cFileName
),
"Invalid fourth entry - %s
\n
"
,
search_results
.
cFileName
);
ok
(
FindNextFile
(
handle
,
&
search_results
),
"Fetching fifth file failed
\n
"
);
ok
(
CHECK_NAME
(
search_results
.
cFileName
),
"Invalid fifth entry - %s
\n
"
,
search_results
.
cFileName
);
#undef CHECK_NAME
ok
(
FindNextFile
(
handle
,
&
search_results
)
==
FALSE
,
"Fetching sixth file should failed
\n
"
);
DeleteFileA
(
"test-dir
\\
file1"
);
DeleteFileA
(
"test-dir
\\
file2"
);
RemoveDirectoryA
(
"test-dir
\\
dir1"
);
RemoveDirectoryA
(
"test-dir"
);
}
static
int
test_Mapfile_createtemp
(
HANDLE
*
handle
)
static
int
test_Mapfile_createtemp
(
HANDLE
*
handle
)
{
{
SetFileAttributesA
(
filename
,
FILE_ATTRIBUTE_NORMAL
);
SetFileAttributesA
(
filename
,
FILE_ATTRIBUTE_NORMAL
);
...
@@ -1839,6 +1876,7 @@ START_TEST(file)
...
@@ -1839,6 +1876,7 @@ START_TEST(file)
test_MoveFileW
();
test_MoveFileW
();
test_FindFirstFileA
();
test_FindFirstFileA
();
test_FindNextFileA
();
test_FindNextFileA
();
test_FindFirstFileExA
();
test_LockFile
();
test_LockFile
();
test_file_sharing
();
test_file_sharing
();
test_offset_in_overlapped_structure
();
test_offset_in_overlapped_structure
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment