jpegview
jpegview copied to clipboard
Add LongPathAware Manifest
Starting from Windows 10, paths can be longer than 260 chars, but apps must declare that they are able to handle it, otherwise _tfopen will fail for those files: https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#application-manifest-updates-to-declare-long-path-capability
I have done a quick test, and it seems to work fine, but I'm not familiar enough with the codebase to confidently add a PR for it. https://github.com/dbeinder/jpegview/commit/b35e15c89f333b9b83c209d3988455d4a9b4abb9#diff-163478135344e1ca85e5f1f587940bdeea4beb3a149510970c22ae1c416d7330
Hmm, this might add a feature... I didn't realize the apps have to declare it.
When you say you've done a quick test... did you name your exe test.exe and include the test.exe.manifest along side it?
I tested it by embedding the manifest into the exe during build:
You may need to enable long paths on your machine if it has been disabled: https://stackoverflow.com/a/71603209/4371382