Bug 46853 - utf8_to_unicode_path breaks .. and . expansion
Summary: utf8_to_unicode_path breaks .. and . expansion
Status: NEW
Alias: None
Product: APR
Classification: Unclassified
Component: APR (show other bugs)
Version: HEAD
Hardware: PC Windows Vista
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-13 15:19 UTC by M8R-3mye921
Modified: 2009-03-14 02:03 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description M8R-3mye921 2009-03-13 15:19:17 UTC
file_io//win32/open.c  utf8_to_unicode_path() 
adds the magic prefix "\\?\" for paths longer than 248 characters. This prefix tells the Windows API to relax checking of MAX_PATH limits, but also to disable ".." and "." expansion.

So manual expansion of ".." and "." is required before adding the \\?\ prefix.

References:
http://msdn.microsoft.com/en-us/library/aa365247.aspx
Comment 1 William A. Rowe Jr. 2009-03-14 02:03:13 UTC
Good catch, seems we need a set of very-long-name tests to catch such issues.  Thanks!