OpenXR-SDK-Source icon indicating copy to clipboard operation
OpenXR-SDK-Source copied to clipboard

Banish MAX_PATH limit

Open rpavlik opened this issue 3 years ago • 3 comments

We can use a bigger number, but many parts of windows use MAX_PATH so it is a bit of an unfortunate de-facto limit in Windows. Another option is to use PathCchCanonicalizeEx and dynamically allocate the buffer to the length needed. What I did was a bit of a lazy but common pattern in Windows programming.

Originally posted by @brycehutchings in https://github.com/KhronosGroup/OpenXR-SDK-Source/pull/198

rpavlik avatar Aug 06 '20 16:08 rpavlik

An issue (number 1427) has been filed to correspond to this issue in the internal Khronos GitLab.

If you have a Khronos account, you can access that issue at KHR:openxr/openxr#1427.

rpavlik-bot avatar Aug 06 '20 17:08 rpavlik-bot

I think PathAllocCanonicalize is ideal, which will allocate the needed space and then we just free the memory after we make a copy.

brycehutchings avatar Aug 13 '20 17:08 brycehutchings

Looks like the loader uses MAX_PATH in FileSysUtilsGetCurrentPath and FileSysUtilsGetAbsolutePath too, besides this new addition for FileSysUtilsGetCanonicalPath.

brycehutchings avatar Aug 13 '20 17:08 brycehutchings