mirror of
https://github.com/reactos/reactos.git
synced 2025-08-01 17:03:00 +00:00
[NTFS] - Fix POSIX rules. Fix accessing long filenames created in Windows when 8dot3 name creation is disabled.
Whether or not a filename should be interpreted as case-sensitive is dependent on a flag passed to the driver when a file is created (opened); it's separate from the namespace associated with the file being accessed. svn path=/branches/GSoC_2016/NTFS/; revision=75178
This commit is contained in:
parent
98ddf610bc
commit
032be02954
8 changed files with 185 additions and 44 deletions
|
@ -283,6 +283,10 @@ NtfsRead(PNTFS_IRP_CONTEXT IrpContext)
|
|||
* @param IrpFlags
|
||||
* TODO: flags are presently ignored in code.
|
||||
*
|
||||
* @param CaseSensitive
|
||||
* Boolean indicating if the function should operate in case-sensitive mode. This will be TRUE
|
||||
* if an application opened the file with the FILE_FLAG_POSIX_SEMANTICS flag.
|
||||
*
|
||||
* @param LengthWritten
|
||||
* Pointer to a ULONG. This ULONG will be set to the number of bytes successfully written.
|
||||
*
|
||||
|
@ -303,6 +307,7 @@ NTSTATUS NtfsWriteFile(PDEVICE_EXTENSION DeviceExt,
|
|||
ULONG Length,
|
||||
ULONG WriteOffset,
|
||||
ULONG IrpFlags,
|
||||
BOOLEAN CaseSensitive,
|
||||
PULONG LengthWritten)
|
||||
{
|
||||
NTSTATUS Status = STATUS_NOT_IMPLEMENTED;
|
||||
|
@ -312,7 +317,15 @@ NTSTATUS NtfsWriteFile(PDEVICE_EXTENSION DeviceExt,
|
|||
ULONG AttributeOffset;
|
||||
ULONGLONG StreamSize;
|
||||
|
||||
DPRINT("NtfsWriteFile(%p, %p, %p, %u, %u, %x, %p)\n", DeviceExt, FileObject, Buffer, Length, WriteOffset, IrpFlags, LengthWritten);
|
||||
DPRINT("NtfsWriteFile(%p, %p, %p, %u, %u, %x, %s, %p)\n",
|
||||
DeviceExt,
|
||||
FileObject,
|
||||
Buffer,
|
||||
Length,
|
||||
WriteOffset,
|
||||
IrpFlags,
|
||||
(CaseSensitive ? "TRUE" : "FALSE"),
|
||||
LengthWritten);
|
||||
|
||||
*LengthWritten = 0;
|
||||
|
||||
|
@ -444,7 +457,13 @@ NTSTATUS NtfsWriteFile(PDEVICE_EXTENSION DeviceExt,
|
|||
filename.Length = fileNameAttribute->NameLength * sizeof(WCHAR);
|
||||
filename.MaximumLength = filename.Length;
|
||||
|
||||
Status = UpdateFileNameRecord(Fcb->Vcb, ParentMFTId, &filename, FALSE, DataSize.QuadPart, AllocationSize);
|
||||
Status = UpdateFileNameRecord(Fcb->Vcb,
|
||||
ParentMFTId,
|
||||
&filename,
|
||||
FALSE,
|
||||
DataSize.QuadPart,
|
||||
AllocationSize,
|
||||
CaseSensitive);
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -667,6 +686,7 @@ NtfsWrite(PNTFS_IRP_CONTEXT IrpContext)
|
|||
Length,
|
||||
ByteOffset.LowPart,
|
||||
Irp->Flags,
|
||||
(IrpContext->Stack->Flags & SL_CASE_SENSITIVE),
|
||||
&ReturnedWriteLength);
|
||||
|
||||
IrpContext->Irp->IoStatus.Status = Status;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue