Open agocke opened 11 months ago
VSCode removed all trailing whitespace here as well -- you can ignore that if you want.
fyi @christophwille
To be honest, I have a hard time connecting the crash with that fix, and I have no way to verify it either. So I will punt on merging this until this repository has a maintainer again.
If the folder doesn't exist, the config variable will be 'ILSpy.xml', and the parent directory name will be an empty string. This will cause CreateDirectory to throw, and the application to potentially crash due to an exception in a background thread. This manifests as a native crash, NSInternalInconsistencyException, on my machine, with the message 'Terminating app due to uncaught exception 'NSInternalInconsistencyException',reason: 'NSWindow drag regions should only be invalidated on the Main Thread'.
By passing 'DoNotVerify' to Environment.GetFolderPath we can avoid the check for directory existence and avoid the crash.