peteraritchie / LongPath

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

IndexOutOfRangeException in Pri.LongPath.Path.NormalizeLongPath #44

Open herebebeasties opened 7 years ago

herebebeasties commented 7 years ago

I've just seen the following in some of our logs, with v2.0.24:

System.IndexOutOfRangeException: Index was outside the bounds of the array.
     at System.Text.StringBuilder.get_Chars(Int32 index)
     at Pri.LongPath.Path.NormalizeLongPath(String path, String parameterName)
     at Pri.LongPath.Path.TryNormalizeLongPath(String path, String& result)
     at Pri.LongPath.Common.Exists(String path, Boolean& isDirectory)
     at Pri.LongPath.File.Exists(String path)

Although sadly I'm not sure what path triggered this (although I think it was a relative path, if that helps). :-(