mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 08:53:01 -05:00
sys: FspFsvolCreateComplete: populate FileNode and FileDesc before name normalization
This commit is contained in:
parent
dca3cb93f3
commit
6e70500afc
@ -808,6 +808,16 @@ NTSTATUS FspFsvolCreateComplete(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* populate the FileNode/FileDesc fields from the Response */
|
/* populate the FileNode/FileDesc fields from the Response */
|
||||||
|
FileNode->UserContext = Response->Rsp.Create.Opened.UserContext;
|
||||||
|
FileNode->IndexNumber = Response->Rsp.Create.Opened.FileInfo.IndexNumber;
|
||||||
|
FileNode->IsDirectory = BooleanFlagOn(Response->Rsp.Create.Opened.FileInfo.FileAttributes,
|
||||||
|
FILE_ATTRIBUTE_DIRECTORY);
|
||||||
|
FileNode->IsRootDirectory = FileNode->IsDirectory &&
|
||||||
|
sizeof(WCHAR) == FileNode->FileName.Length && L'\\' == FileNode->FileName.Buffer[0];
|
||||||
|
FileDesc->UserContext2 = Response->Rsp.Create.Opened.UserContext2;
|
||||||
|
FileDesc->DeleteOnClose = BooleanFlagOn(IrpSp->Parameters.Create.Options, FILE_DELETE_ON_CLOSE);
|
||||||
|
|
||||||
|
/* handle normalized names */
|
||||||
if (!FsvolDeviceExtension->VolumeParams.CaseSensitiveSearch)
|
if (!FsvolDeviceExtension->VolumeParams.CaseSensitiveSearch)
|
||||||
{
|
{
|
||||||
/* is there a normalized file name as part of the response? */
|
/* is there a normalized file name as part of the response? */
|
||||||
@ -843,14 +853,6 @@ NTSTATUS FspFsvolCreateComplete(
|
|||||||
RtlCopyMemory(FileNode->FileName.Buffer, NormalizedName.Buffer, NormalizedName.Length);
|
RtlCopyMemory(FileNode->FileName.Buffer, NormalizedName.Buffer, NormalizedName.Length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FileNode->UserContext = Response->Rsp.Create.Opened.UserContext;
|
|
||||||
FileNode->IndexNumber = Response->Rsp.Create.Opened.FileInfo.IndexNumber;
|
|
||||||
FileNode->IsDirectory = BooleanFlagOn(Response->Rsp.Create.Opened.FileInfo.FileAttributes,
|
|
||||||
FILE_ATTRIBUTE_DIRECTORY);
|
|
||||||
FileNode->IsRootDirectory = FileNode->IsDirectory &&
|
|
||||||
sizeof(WCHAR) == FileNode->FileName.Length && L'\\' == FileNode->FileName.Buffer[0];
|
|
||||||
FileDesc->UserContext2 = Response->Rsp.Create.Opened.UserContext2;
|
|
||||||
FileDesc->DeleteOnClose = BooleanFlagOn(IrpSp->Parameters.Create.Options, FILE_DELETE_ON_CLOSE);
|
|
||||||
|
|
||||||
/* open the FileNode */
|
/* open the FileNode */
|
||||||
Result = FspFileNodeOpen(FileNode, FileObject,
|
Result = FspFileNodeOpen(FileNode, FileObject,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user