Skip to content

Commit 47ad17a

Browse files
committed
Library - Use Case sensitive option when listing filtering is done by the library
0e207a0 wrongly removed the DokanIsNameInExpression caseSensitive usage. When the library does the filtering, it should take into account the type of filesystem case type used.
1 parent e02f1ad commit 47ad17a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dokan/directory.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,8 @@ LONG MatchFiles(PDOKAN_IO_EVENT IoEvent, PDOKAN_VECTOR DirList) {
391391
BOOL patternCheck = FALSE;
392392
PWCHAR pattern = NULL;
393393
BOOL bufferOverFlow = FALSE;
394+
BOOL caseSensitive = IoEvent->DokanInstance->DokanOptions->Options &
395+
DOKAN_OPTION_CASE_SENSITIVE;
394396

395397
if (IoEvent->EventContext->Operation.Directory.SearchPatternLength > 0) {
396398
pattern = (PWCHAR)((SIZE_T)&IoEvent->EventContext->Operation.Directory
@@ -412,7 +414,8 @@ LONG MatchFiles(PDOKAN_IO_EVENT IoEvent, PDOKAN_VECTOR DirList) {
412414

413415
// pattern is not specified or pattern match is ignore cases
414416
if (!patternCheck ||
415-
DokanIsNameInExpression(pattern, find->FindData.cFileName, TRUE)) {
417+
DokanIsNameInExpression(pattern, find->FindData.cFileName,
418+
!caseSensitive)) {
416419
if (IoEvent->EventContext->Operation.Directory.FileIndex <= index) {
417420
// index+1 is very important, should use next entry index
418421
ULONG entrySize = DokanFillDirectoryInformation(

0 commit comments

Comments
 (0)