-Don't add a preceding backslash when creating files on root.
-Use NTFS_FILE_NAME_POSIX name type if CaseSensitive option is specified.
-Don't try to create a file when a folder is requested (folder creation is still TODO).
svn path=/branches/GSoC_2016/NTFS/; revision=75671
// we need to extract the filename from the path
DPRINT1("Pathname: %wZ\n", &FileObject->FileName);
// we need to extract the filename from the path
DPRINT1("Pathname: %wZ\n", &FileObject->FileName);
- FilenameNoPath.Buffer = FileObject->FileName.Buffer;
- FilenameNoPath.MaximumLength = FilenameNoPath.Length = FileObject->FileName.Length;
-
FsRtlDissectName(FileObject->FileName, &Current, &Remaining);
FsRtlDissectName(FileObject->FileName, &Current, &Remaining);
+ FilenameNoPath.Buffer = Current.Buffer;
+ FilenameNoPath.MaximumLength = FilenameNoPath.Length = Current.Length;
+
while (Current.Length != 0)
{
DPRINT1("Current: %wZ\n", &Current);
while (Current.Length != 0)
{
DPRINT1("Current: %wZ\n", &Current);
// For now, we're emulating the way Windows behaves when 8.3 name generation is disabled
// TODO: add DOS Filename as needed
// 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))
+ if (!CaseSensitive && RtlIsNameLegalDOS8Dot3(&FilenameNoPath, NULL, NULL))
FileNameAttribute->NameType = NTFS_FILE_NAME_WIN32_AND_DOS;
else
FileNameAttribute->NameType = NTFS_FILE_NAME_POSIX;
FileNameAttribute->NameType = NTFS_FILE_NAME_WIN32_AND_DOS;
else
FileNameAttribute->NameType = NTFS_FILE_NAME_POSIX;
return STATUS_ACCESS_DENIED;
}
return STATUS_ACCESS_DENIED;
}
+ // We can't create directories yet
+ if (RequestedOptions & FILE_DIRECTORY_FILE)
+ {
+ DPRINT1("FIXME: Folder creation is still TODO!\n");
+ return STATUS_NOT_IMPLEMENTED;
+ }
+
// Create the file record on disk
Status = NtfsCreateFileRecord(DeviceExt,
FileObject,
// Create the file record on disk
Status = NtfsCreateFileRecord(DeviceExt,
FileObject,