tst: passthrough-dotnet: fix ReadDirectoryEntry when running fs over drive root

This commit is contained in:
Bill Zissimopoulos 2017-12-05 18:50:39 -08:00
parent ead599e337
commit f3819ba839
No known key found for this signature in database
GPG Key ID: 3D4F95D52C7B3EA3

View File

@ -641,13 +641,16 @@ namespace passthrough
if (null == FileDesc.FileSystemInfos)
{
if (null != Pattern)
Pattern = Pattern.Replace('<', '*').Replace('>', '?').Replace('=', '.');
Pattern = Pattern.Replace('<', '*').Replace('>', '?').Replace('"', '.');
else
Pattern = "*";
IEnumerable Enum = FileDesc.DirInfo.EnumerateFileSystemInfos(Pattern);
SortedList List = new SortedList();
if (null != FileDesc.DirInfo && null != FileDesc.DirInfo.Parent)
{
List.Add(".", FileDesc.DirInfo);
List.Add("..", FileDesc.DirInfo.Parent);
}
foreach (FileSystemInfo Info in Enum)
List.Add(Info.Name, Info);
FileDesc.FileSystemInfos = new DictionaryEntry[List.Count];