mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
[NTFS] - Fix creation of files with long filenames.
svn path=/branches/GSoC_2016/NTFS/; revision=75193
This commit is contained in:
parent
8bb62e20d3
commit
e4aab26781
1 changed files with 8 additions and 2 deletions
|
@ -220,9 +220,15 @@ AddFileName(PFILE_RECORD_HEADER FileRecord,
|
|||
DPRINT1("FileNameAttribute->DirectoryFileReferenceNumber: 0x%016I64x\n", FileNameAttribute->DirectoryFileReferenceNumber);
|
||||
|
||||
FileNameAttribute->NameLength = FilenameNoPath.Length / sizeof(WCHAR);
|
||||
// TODO: Get proper nametype, add DOS links as needed
|
||||
FileNameAttribute->NameType = NTFS_FILE_NAME_WIN32_AND_DOS;
|
||||
RtlCopyMemory(FileNameAttribute->Name, FilenameNoPath.Buffer, FilenameNoPath.Length);
|
||||
|
||||
// For now, we're emulating the way Windows behaves when 8.3 name generation is disabled
|
||||
// TODO: add DOS Filename as needed
|
||||
if (RtlIsNameLegalDOS8Dot3(&FilenameNoPath, NULL, NULL))
|
||||
FileNameAttribute->NameType = NTFS_FILE_NAME_WIN32_AND_DOS;
|
||||
else
|
||||
FileNameAttribute->NameType = NTFS_FILE_NAME_POSIX;
|
||||
|
||||
FileRecord->LinkCount++;
|
||||
|
||||
AttributeAddress->Length = ResidentHeaderLength +
|
||||
|
|
Loading…
Reference in a new issue