From 6a412d7c21bc36db41a1d5a23f6e192e3ae4890c Mon Sep 17 00:00:00 2001 From: Liryna Date: Sun, 7 Jul 2024 09:02:18 -0400 Subject: [PATCH] Library - Log - Only print one FileInformationClass --- dokan/fileinfo.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/dokan/fileinfo.c b/dokan/fileinfo.c index 5ade27ac..8ec1c94d 100644 --- a/dokan/fileinfo.c +++ b/dokan/fileinfo.c @@ -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( @@ -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); @@ -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; }