litedb-org/LiteDB.Studio

System.ArgumentOutOfRangeException in BalanceString function

Opened this issue · 0 comments

rpm11 commented

The exception is thrown when direName.Length = 19, for example.
For testing purposes, changed
return startCounter > direName.Length + 3 ? path : $@"{direName.Substring(0, startCounter)}...\{fileName}";
to
return startCounter > direName.Length + 3 ? path : $@"{direName.Substring(0, startCounter - 3)}...\{fileName}";
and it seems to work fine.
Thank you!