Author: tthompson Date: Fri Aug 25 17:16:04 2017 New Revision: 75671
URL: http://svn.reactos.org/svn/reactos?rev=75671&view=rev Log: [NTFS] - When creating files: -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).
Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/create.c
Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/drivers/filesyste... ============================================================================== --- branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c [iso-8859-1] (original) +++ branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c [iso-8859-1] Fri Aug 25 17:16:04 2017 @@ -172,10 +172,10 @@ // 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); + + FilenameNoPath.Buffer = Current.Buffer; + FilenameNoPath.MaximumLength = FilenameNoPath.Length = Current.Length;
while (Current.Length != 0) { @@ -232,7 +232,7 @@
// 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;
Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/create.c URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/drivers/filesyste... ============================================================================== --- branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/create.c [iso-8859-1] (original) +++ branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/create.c [iso-8859-1] Fri Aug 25 17:16:04 2017 @@ -567,6 +567,13 @@ DPRINT1("NTFS write-support is EXPERIMENTAL and is disabled by default!\n"); NtfsCloseFile(DeviceExt, FileObject); 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