peteraritchie / LongPath

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

Directory.CreateDirectory throws when passed a UNC path near MAX_PATH in length #45

Closed monkeyhell closed 7 years ago

monkeyhell commented 7 years ago

If you invoke Directory.CreateDirectory, passing it a UNC path that is MAX_PATH (i.e. 260) characters long, it works fine. If you instead pass a UNC path that is MAX_PATH - 1 (i.e. 259) characters long, it throws a System.IO.PathTooLongException.