mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:13:03 +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
|
@ -115,6 +115,10 @@ AddData(PFILE_RECORD_HEADER FileRecord,
|
|||
* @param ParentMftIndex
|
||||
* Pointer to a ULONGLONG which will receive the index of the parent directory.
|
||||
*
|
||||
* @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.
|
||||
*
|
||||
* @return
|
||||
* STATUS_SUCCESS on success. STATUS_NOT_IMPLEMENTED if target address isn't at the end
|
||||
* of the given file record.
|
||||
|
@ -132,7 +136,8 @@ AddFileName(PFILE_RECORD_HEADER FileRecord,
|
|||
PNTFS_ATTR_RECORD AttributeAddress,
|
||||
PDEVICE_EXTENSION DeviceExt,
|
||||
PFILE_OBJECT FileObject,
|
||||
PULONGLONG ParentMftIndex)
|
||||
PULONGLONG ParentMftIndex,
|
||||
BOOLEAN CaseSensitive)
|
||||
{
|
||||
ULONG ResidentHeaderLength = FIELD_OFFSET(NTFS_ATTR_RECORD, Resident.Reserved) + sizeof(UCHAR);
|
||||
PFILENAME_ATTRIBUTE FileNameAttribute;
|
||||
|
@ -178,7 +183,13 @@ AddFileName(PFILE_RECORD_HEADER FileRecord,
|
|||
if(Remaining.Length != 0)
|
||||
RtlCopyUnicodeString(&FilenameNoPath, &Remaining);
|
||||
|
||||
Status = NtfsFindMftRecord(DeviceExt, CurrentMFTIndex, &Current, &FirstEntry, FALSE, &CurrentMFTIndex);
|
||||
Status = NtfsFindMftRecord(DeviceExt,
|
||||
CurrentMFTIndex,
|
||||
&Current,
|
||||
&FirstEntry,
|
||||
FALSE,
|
||||
&CurrentMFTIndex,
|
||||
CaseSensitive);
|
||||
if (!NT_SUCCESS(Status))
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue