<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Insure Windows wildcards work properly with long paths"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=138615#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Insure Windows wildcards work properly with long paths"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=138615">bug 138615</a>
from <span class="vcard"><a class="email" href="mailto:mikekaganski@hotmail.com" title="Mike Kaganski <mikekaganski@hotmail.com>"> <span class="fn">Mike Kaganski</span></a>
</span></b>
<pre>I would suggest using PathCchCanonicalizeEx for this, with
PATHCCH_ENSURE_IS_EXTENDED_LENGTH_PATH flag. It fits perfectly for the task,
except conversion of "/" into "\" - it does everything else, like removing "."
and "..", making sure the path has the "\\?\" in case when the mask is shorter
than 2MAX_PATH, but the found name would be longer ... but the problem is, the
function is supported since Windows 8, while our baseline is Windows 7 still.
[1]
<a href="https://docs.microsoft.com/en-us/windows/win32/api/pathcch/nf-pathcch-pathcchcanonicalizeex">https://docs.microsoft.com/en-us/windows/win32/api/pathcch/nf-pathcch-pathcchcanonicalizeex</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>