Jan Nieuwenhuizen wrote:

Do you see a cheap way to return the correct casing for the rest of the
file name?  That could be nice, maybe a change like that has a chance of
being accepted.

The only safe way I've found is to call
'GetShortPathName()' and 'GetLongPathNameA()'
to get the true correct casing:
  https://github.com/gvanem/EnvTool/blob/master/src/get_file_assoc.c#L165

Works fine if the file is not already on 8.3 SFN form.

Or perhaps 'SHGetFileInfoA()' with the 'SHGFI_DISPLAYNAME' flag.
See:
 
https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shgetfileinfoa

--
--gv

Reply via email to