Linux and OSX directory length limits

This commit is contained in:
= 2022-12-29 15:29:18 -07:00
parent 6901b8be35
commit f822a23daa
3 changed files with 67 additions and 23 deletions

View file

@ -68,7 +68,7 @@ namespace FileManager
///a choice made by the linux kernel. As best as I can tell, pretty
//much everyone uses UTF-8.
int getFilesystemStringLength(StringBuilder str)
=> LongPath.PlatformID is PlatformID.Win32NT ?
=> LongPath.IsWindows ?
str.Length
: Encoding.UTF8.GetByteCount(str.ToString());