winfsp-tests: dirctl-test

This commit is contained in:
Bill Zissimopoulos 2016-03-25 14:19:38 -07:00
parent ce8bac3898
commit c898100dac
2 changed files with 3 additions and 3 deletions

View File

@ -110,8 +110,8 @@ void querydir_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTimeout)
} while (FindNextFileW(Handle, &FindData));
ASSERT(ERROR_NO_MORE_FILES == GetLastError());
ASSERT(100 == FileCount);
ASSERT(101 * 100 / 2 == FileTotal);
ASSERT(10 == FileCount);
ASSERT(11 * 10 / 2 == FileTotal);
Success = FindClose(Handle);
ASSERT(Success);

View File

@ -707,7 +707,7 @@ static BOOLEAN ReadDirectoryEnumFn(MEMFS_FILE_NODE *FileNode, PVOID Context0)
return TRUE;
memset(DirInfo->Padding, 0, sizeof DirInfo->Padding);
DirInfo->Size = sizeof(FSP_FSCTL_DIR_INFO) + wcslen(FileNode->FileName) * sizeof(WCHAR);
DirInfo->Size = (UINT16)(sizeof(FSP_FSCTL_DIR_INFO) + wcslen(FileNode->FileName) * sizeof(WCHAR));
DirInfo->FileInfo = FileNode->FileInfo;
DirInfo->NextOffset = FileNode->FileInfo.IndexNumber;
memcpy(DirInfo->FileNameBuf, FileNode->FileName, DirInfo->Size - sizeof(FSP_FSCTL_DIR_INFO));