Author: pschweitzer
Date: Mon Aug 24 09:52:30 2015
New Revision: 68811
URL:
http://svn.reactos.org/svn/reactos?rev=68811&view=rev
Log:
[NTFS]
Support full data stream name on open (i.e., stream name finished with :$DATA)
Modified:
trunk/reactos/drivers/filesystems/ntfs/fcb.c
Modified: trunk/reactos/drivers/filesystems/ntfs/fcb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/fcb.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/fcb.c [iso-8859-1] Mon Aug 24 09:52:30 2015
@@ -545,7 +545,7 @@
UNICODE_STRING File;
PFILE_RECORD_HEADER FileRecord;
ULONGLONG MFTIndex;
- PWSTR Colon;
+ PWSTR Colon, OldColon;
PNTFS_ATTR_CONTEXT DataContext;
USHORT Length = 0;
@@ -560,6 +560,23 @@
{
Length = File.Length;
File.Length = (Colon - FileToFind) * sizeof(WCHAR);
+
+ if (_wcsicmp(Colon + 1, L"$DATA") == 0)
+ {
+ OldColon = Colon;
+ Colon[0] = UNICODE_NULL;
+ Colon = wcsrchr(FileToFind, L':');
+ if (Colon != NULL)
+ {
+ Length = File.Length;
+ File.Length = (Colon - FileToFind) * sizeof(WCHAR);
+ }
+ else
+ {
+ Colon = OldColon;
+ Colon[0] = L':';
+ }
+ }
/* Skip colon */
++Colon;