[Github-comments] [geany/geany] Files with long paths don’t work correctly on Windows (#1534)

Matthew Brush notifications at xxxxx
Tue Jul 11 23:39:28 UTC 2017


>From the docs for [GetFullPathName](https://msdn.microsoft.com/en-us/library/windows/desktop/aa364963(v=vs.85).aspx):

> In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function (GetFullPathNameW), and prepend "\\?\" to the path.

I'm not sure why we use any ANSI functions in Win32 code, that stuff has been deprecated for nearly 20 years by now. We should just define `_UNICODE` or whatever and use the bare wrapper macros and `TCHAR` for character type.

Some time ago I wrote a portable, "proper" (not limited size) `realpath` kind of function, using `GetFullPathName()` on Windows, `canonicalize_file_name()` where supported, and `pathconf/realpath` on others, etc. If I get a chance I'll see if I can find it or re-implement it (it was fairly straightforward).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1534#issuecomment-314601771
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20170711/53e2d34a/attachment.html>


More information about the Github-comments mailing list