From ead599e337409b6dcfdaff0fa514fbcf5af652ab Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Tue, 5 Dec 2017 10:32:58 -0800 Subject: [PATCH] tst: passthrough-dotnet: handle undoc wildcards in ReadDirectoryEntry - reported by Pavel Franc over email --- tst/passthrough-dotnet/Program.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tst/passthrough-dotnet/Program.cs b/tst/passthrough-dotnet/Program.cs index 1a32e3ff..a82c99af 100644 --- a/tst/passthrough-dotnet/Program.cs +++ b/tst/passthrough-dotnet/Program.cs @@ -640,8 +640,11 @@ namespace passthrough FileDesc FileDesc = (FileDesc)FileDesc0; if (null == FileDesc.FileSystemInfos) { - IEnumerable Enum = FileDesc.DirInfo.EnumerateFileSystemInfos( - null != Pattern ? Pattern : "*"); + if (null != Pattern) + Pattern = Pattern.Replace('<', '*').Replace('>', '?').Replace('=', '.'); + else + Pattern = "*"; + IEnumerable Enum = FileDesc.DirInfo.EnumerateFileSystemInfos(Pattern); SortedList List = new SortedList(); List.Add(".", FileDesc.DirInfo); List.Add("..", FileDesc.DirInfo.Parent);