mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:42:57 +00:00
[CDFS]
Fix returned data handling on directory enumeration. Patch by Giannis Adamopoulos CORE-13143 svn path=/trunk/; revision=74430
This commit is contained in:
parent
996f952333
commit
3d271a9794
1 changed files with 5 additions and 15 deletions
|
@ -689,20 +689,11 @@ CdfsQueryDirectory(PDEVICE_OBJECT DeviceObject,
|
||||||
|
|
||||||
if (Status == STATUS_BUFFER_OVERFLOW)
|
if (Status == STATUS_BUFFER_OVERFLOW)
|
||||||
{
|
{
|
||||||
if (Buffer0)
|
|
||||||
{
|
|
||||||
Buffer0->NextEntryOffset = 0;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Buffer0)
|
|
||||||
{
|
|
||||||
Buffer0->NextEntryOffset = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (First)
|
if (First)
|
||||||
{
|
{
|
||||||
Status = STATUS_NO_SUCH_FILE;
|
Status = STATUS_NO_SUCH_FILE;
|
||||||
|
@ -717,12 +708,13 @@ CdfsQueryDirectory(PDEVICE_OBJECT DeviceObject,
|
||||||
Buffer0 = (PFILE_NAMES_INFORMATION)Buffer;
|
Buffer0 = (PFILE_NAMES_INFORMATION)Buffer;
|
||||||
Buffer0->FileIndex = FileIndex++;
|
Buffer0->FileIndex = FileIndex++;
|
||||||
Ccb->Entry++;
|
Ccb->Entry++;
|
||||||
|
BufferLength -= Buffer0->NextEntryOffset;
|
||||||
|
|
||||||
if (Stack->Flags & SL_RETURN_SINGLE_ENTRY)
|
if (Stack->Flags & SL_RETURN_SINGLE_ENTRY)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
BufferLength -= Buffer0->NextEntryOffset;
|
|
||||||
Buffer += Buffer0->NextEntryOffset;
|
Buffer += Buffer0->NextEntryOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -734,6 +726,7 @@ CdfsQueryDirectory(PDEVICE_OBJECT DeviceObject,
|
||||||
if (FileIndex > 0)
|
if (FileIndex > 0)
|
||||||
{
|
{
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
|
Irp->IoStatus.Information = Stack->Parameters.QueryDirectory.Length - BufferLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
return(Status);
|
return(Status);
|
||||||
|
@ -793,6 +786,8 @@ CdfsDirectoryControl(
|
||||||
Irp = IrpContext->Irp;
|
Irp = IrpContext->Irp;
|
||||||
DeviceObject = IrpContext->DeviceObject;
|
DeviceObject = IrpContext->DeviceObject;
|
||||||
|
|
||||||
|
Irp->IoStatus.Information = 0;
|
||||||
|
|
||||||
switch (IrpContext->MinorFunction)
|
switch (IrpContext->MinorFunction)
|
||||||
{
|
{
|
||||||
case IRP_MN_QUERY_DIRECTORY:
|
case IRP_MN_QUERY_DIRECTORY:
|
||||||
|
@ -811,11 +806,6 @@ CdfsDirectoryControl(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Status != STATUS_PENDING)
|
|
||||||
{
|
|
||||||
Irp->IoStatus.Information = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return(Status);
|
return(Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue