Closed okrushelnitsky closed 6 years ago
Thanks!
No problem.
This fix causes a unit test to fail: DirectoryInfo_CatchPathTooLongException_FolderNameGreaterThan255Characters_LocalAndNetwork_Success()
How does your path look like?
Sorry, I wrongly interpreted condition after normalization 'while' cycle in NormalizePath. Condition in 'while' cycle I fixed rightly.
The path looks like:
E:\temp\<255 chars>\testfile.txt
There is a problem with paths that contain components with maximum length (255 chars in Windows). This paths are valid but Path.NormalizePath method throws exception PathTooLongException. Path.NormalizePath has checks for length of path components but this checks contains miscalculation for one char.