Support full data stream name on open (i.e., stream name finished with :$DATA)

svn path=/trunk/; revision=68811
This commit is contained in:
Pierre Schweitzer 2015-08-24 09:52:30 +00:00
parent 5f9af4a19f
commit 8b651ad6d9

View file

@ -545,7 +545,7 @@ NtfsDirFindFile(PNTFS_VCB Vcb,
UNICODE_STRING File;
PFILE_RECORD_HEADER FileRecord;
ULONGLONG MFTIndex;
PWSTR Colon;
PWSTR Colon, OldColon;
PNTFS_ATTR_CONTEXT DataContext;
USHORT Length = 0;
@ -561,6 +561,23 @@ NtfsDirFindFile(PNTFS_VCB Vcb,
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;
DPRINT1("Will now look for file '%wZ' with stream '%S'\n", &File, Colon);