Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GetLongPathName() returns case sensitive path?

125 views
Skip to first unread message

zag...@hotmail.com

unread,
Jul 2, 2003, 2:09:44 PM7/2/03
to
In debugging a problem, I am seeing the following behavior
with a MS API call GetLongPathName():

It has problems resolving the case of a sub-directory
component which is longer than 8 characters. For example,
on the c:\ drive we have the following
c:\ABCdefgh\SUBDIR\file.txt and
c:\ABCdefghij\SUBDIR\file.txt.

Now, if we pass c:\abcdefgh\subdir\file.txt to
GetLongPathName() we get back c:\ABCdefgh\SUBDIR\file.txt.
If we pass c:\abcdefghij\subdir\file.txt to the function
then it will return c:\abcdefghij\SUBDIR\file.txt.
Through ad-hoc testing I observed the problem when a sub-
directory component was greater than 8 characters in
length. Testing was performed on W2K and volumes used for
testing were formatted as NTFS.

Should GetLongPathName() return a path with the correct
case? If so, is this a known problem with the
GetLongPathName() function? If it is a known problem then
are there any plans to fix it?

Ken Wickes [MSFT]

unread,
Jul 2, 2003, 2:26:42 PM7/2/03
to
Looks like if a path component is longer than a possible 8.3 name,
GetLongPathName assumes it is already a long name and ignores it. The Win32
file apis are case-insensitive some I'm not sure this is really a flaw. You
might get more consistent results by calling GetShortPathName then
GetLongPathName.

--

Ken Wickes [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.


<zag...@hotmail.com> wrote in message
news:00c101c340c5$1dc105b0$a501...@phx.gbl...

0 new messages