Author: pschweitzer
Date: Fri Apr 28 19:32:44 2017
New Revision: 74430
URL:
http://svn.reactos.org/svn/reactos?rev=74430&view=rev
Log:
[CDFS]
Fix returned data handling on directory enumeration.
Patch by Giannis Adamopoulos
CORE-13143
Modified:
trunk/reactos/drivers/filesystems/cdfs/dirctl.c
Modified: trunk/reactos/drivers/filesystems/cdfs/dirctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/d…
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/dirctl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/dirctl.c [iso-8859-1] Fri Apr 28 19:32:44 2017
@@ -689,20 +689,11 @@
if (Status == STATUS_BUFFER_OVERFLOW)
{
- if (Buffer0)
- {
- Buffer0->NextEntryOffset = 0;
- }
break;
}
}
else
{
- if (Buffer0)
- {
- Buffer0->NextEntryOffset = 0;
- }
-
if (First)
{
Status = STATUS_NO_SUCH_FILE;
@@ -717,12 +708,13 @@
Buffer0 = (PFILE_NAMES_INFORMATION)Buffer;
Buffer0->FileIndex = FileIndex++;
Ccb->Entry++;
+ BufferLength -= Buffer0->NextEntryOffset;
if (Stack->Flags & SL_RETURN_SINGLE_ENTRY)
{
break;
}
- BufferLength -= Buffer0->NextEntryOffset;
+
Buffer += Buffer0->NextEntryOffset;
}
@@ -734,6 +726,7 @@
if (FileIndex > 0)
{
Status = STATUS_SUCCESS;
+ Irp->IoStatus.Information = Stack->Parameters.QueryDirectory.Length -
BufferLength;
}
return(Status);
@@ -793,6 +786,8 @@
Irp = IrpContext->Irp;
DeviceObject = IrpContext->DeviceObject;
+ Irp->IoStatus.Information = 0;
+
switch (IrpContext->MinorFunction)
{
case IRP_MN_QUERY_DIRECTORY:
@@ -811,11 +806,6 @@
break;
}
- if (Status != STATUS_PENDING)
- {
- Irp->IoStatus.Information = 0;
- }
-
return(Status);
}