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
8758a8a6
Commit
8758a8a6
authored
Sep 28, 2014
by
Michael Müller
Committed by
Alexandre Julliard
Jan 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Correctly treat '.' when enumerating files in PathIsDirectoryEmptyW.
parent
cffe06af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
path.c
dlls/shlwapi/path.c
+16
-7
No files found.
dlls/shlwapi/path.c
View file @
8758a8a6
...
...
@@ -3872,13 +3872,13 @@ BOOL WINAPI PathIsDirectoryEmptyW(LPCWSTR lpszPath)
WCHAR
szSearch
[
MAX_PATH
];
DWORD
dwLen
;
HANDLE
hfind
;
BOOL
retVal
=
FALS
E
;
BOOL
retVal
=
TRU
E
;
WIN32_FIND_DATAW
find_data
;
TRACE
(
"(%s)
\n
"
,
debugstr_w
(
lpszPath
));
if
(
!
lpszPath
||
!
PathIsDirectoryW
(
lpszPath
))
return
FALSE
;
return
FALSE
;
lstrcpynW
(
szSearch
,
lpszPath
,
MAX_PATH
);
PathAddBackslashW
(
szSearch
);
...
...
@@ -3888,14 +3888,23 @@ BOOL WINAPI PathIsDirectoryEmptyW(LPCWSTR lpszPath)
strcpyW
(
szSearch
+
dwLen
,
szAllFiles
);
hfind
=
FindFirstFileW
(
szSearch
,
&
find_data
);
if
(
hfind
!=
INVALID_HANDLE_VALUE
)
if
(
hfind
==
INVALID_HANDLE_VALUE
)
return
FALSE
;
do
{
if
(
find_data
.
cFileName
[
0
]
==
'.'
&&
find_data
.
cFileName
[
1
]
==
'.'
)
/* The only directory entry should be the parent */
retVal
=
!
FindNextFileW
(
hfind
,
&
find_data
);
FindClose
(
hfind
);
if
(
find_data
.
cFileName
[
0
]
==
'.'
)
{
if
(
find_data
.
cFileName
[
1
]
==
'\0'
)
continue
;
if
(
find_data
.
cFileName
[
1
]
==
'.'
&&
find_data
.
cFileName
[
2
]
==
'\0'
)
continue
;
}
retVal
=
FALSE
;
break
;
}
while
(
FindNextFileW
(
hfind
,
&
find_data
));
FindClose
(
hfind
);
return
retVal
;
}
...
...
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