mbdavid / LiteDB.Studio

A GUI tool for viewing and editing documents for LiteDB v5
MIT License
750 stars 197 forks source link

System.ArgumentOutOfRangeException in BalanceString function #45

Open rpm11 opened 3 years ago

rpm11 commented 3 years ago

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!