forked from icsharpcode/ILSpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Checks maximum path length using .NET features.
This changes the ProjectWriter class so that files created by it are validated using DirectoryInfo and/or FileInfo classes. Also adjusts hardcoded path lengths to: - use actual maximum windows' LongPaths feature allows (32767), - specify exact path part character limit (258-12), which reserves characters for the 8.3 legacy file name format, - increases unsupported platforms' limit to 200 characters instead of 30 Now WholeProjectDecompiler class will always check for full path while trying to create files to properly validate maximum path length exceeds. The hardcoded maxPathLength value (258) was tested to its edge cases, in which Visual Studio 2022 would allow a value of up to 259, whereas Notepad++ and WordPad won't open files with paths that long. Arbitrary values would also work (as far as DirInfo doesn't throw an exception, but most Windows applications wouldn't be able to handle the files. Related GitHub issue: icsharpcode#2706.
- Loading branch information
Heavenly Avenger
committed
Jun 13, 2022
1 parent
874ac9a
commit dc5512c
Showing
1 changed file
with
96 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters