mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
tst: passthrough-dotnet: fix ReadDirectoryEntry when running fs over drive root
This commit is contained in:
parent
ead599e337
commit
f3819ba839
@ -641,13 +641,16 @@ namespace passthrough
|
|||||||
if (null == FileDesc.FileSystemInfos)
|
if (null == FileDesc.FileSystemInfos)
|
||||||
{
|
{
|
||||||
if (null != Pattern)
|
if (null != Pattern)
|
||||||
Pattern = Pattern.Replace('<', '*').Replace('>', '?').Replace('=', '.');
|
Pattern = Pattern.Replace('<', '*').Replace('>', '?').Replace('"', '.');
|
||||||
else
|
else
|
||||||
Pattern = "*";
|
Pattern = "*";
|
||||||
IEnumerable Enum = FileDesc.DirInfo.EnumerateFileSystemInfos(Pattern);
|
IEnumerable Enum = FileDesc.DirInfo.EnumerateFileSystemInfos(Pattern);
|
||||||
SortedList List = new SortedList();
|
SortedList List = new SortedList();
|
||||||
List.Add(".", FileDesc.DirInfo);
|
if (null != FileDesc.DirInfo && null != FileDesc.DirInfo.Parent)
|
||||||
List.Add("..", FileDesc.DirInfo.Parent);
|
{
|
||||||
|
List.Add(".", FileDesc.DirInfo);
|
||||||
|
List.Add("..", FileDesc.DirInfo.Parent);
|
||||||
|
}
|
||||||
foreach (FileSystemInfo Info in Enum)
|
foreach (FileSystemInfo Info in Enum)
|
||||||
List.Add(Info.Name, Info);
|
List.Add(Info.Name, Info);
|
||||||
FileDesc.FileSystemInfos = new DictionaryEntry[List.Count];
|
FileDesc.FileSystemInfos = new DictionaryEntry[List.Count];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user