peteraritchie / LongPath

drop-in library to support long paths in .NET
GNU Lesser General Public License v3.0
112 stars 43 forks source link

Endless loop #90

Closed HengWh closed 2 years ago

HengWh commented 3 years ago

I create a directory "D:\Test\ \" . It's include “\0\0\0”.
Directory.Create(@"D:\Test\ \");

void GetDir(string rootDir) { var subDirs = rootDir.GetDirectories(); foreach (var dir in subDirs) { // Directory ("D:\Test\ \") first subdir is same as parent. Then endless loop. GetDir(dir); } }

Although it's rare, But I meet it now.