Skip to content

Commit

Permalink
Library - Log - Only print one FileInformationClass
Browse files Browse the repository at this point in the history
  • Loading branch information
Liryna committed Jul 7, 2024
1 parent e0b137f commit 6a412d7
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions dokan/fileinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,9 @@ VOID DOKANAPI DokanEndDispatchGetFileInformation(
IoEvent->EventResult->Status = STATUS_INVALID_PARAMETER;
IoEvent->EventResult->BufferLength = 0;
} else {

switch (IoEvent->EventContext->Operation.File.FileInformationClass) {
ULONG fileInformationClass =
IoEvent->EventContext->Operation.File.FileInformationClass;
switch (fileInformationClass) {
case FileBasicInformation:
DbgPrint("\tFileBasicInformation\n");
Status = DokanFillFileBasicInfo(
Expand Down Expand Up @@ -380,10 +381,13 @@ VOID DOKANAPI DokanEndDispatchGetFileInformation(
break;

case FileNormalizedNameInformation:
DbgPrint("\tFileNormalizedNameInformation\n");
case FileNameInformation:
// this case is not used because driver deal with
DbgPrint("\tFileNameInformation\n");
if (fileInformationClass == FileNormalizedNameInformation) {
DbgPrint("\tFileNormalizedNameInformation\n");
} else {
DbgPrint("\tFileNameInformation\n");
}
Status = DokanFillFileNameInfo(
(PFILE_NAME_INFORMATION)IoEvent->EventResult->Buffer,
ByHandleFileInfo, &remainingLength, IoEvent->EventContext);
Expand All @@ -410,8 +414,7 @@ VOID DOKANAPI DokanEndDispatchGetFileInformation(
break;
default: {
Status = STATUS_INVALID_PARAMETER;
DbgPrint(" unknown type:%d\n",
IoEvent->EventContext->Operation.File.FileInformationClass);
DbgPrint(" unknown type:%d\n", fileInformationClass);
} break;
}

Expand Down

0 comments on commit 6a412d7

Please sign in to comment.