[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Windows drive letter check fails on lower case cwd

From: Philip Martin <philip_at_codematters.co.uk>
Date: Sat, 07 Nov 2009 20:41:04 +0000

Bert Huijben <rhuijben_at_sharpsvn.net> writes:

> Index: file_io/win32/filepath.c
> ===================================================================
> --- file_io/win32/filepath.c (revision 832725)
> +++ file_io/win32/filepath.c (working copy)
> @@ -540,7 +540,8 @@
> * use the basepath _if_ it matches this drive letter!
> * Otherwise we must discard the basepath.
> */
> - if (addroot[0] == baseroot[0] && baseroot[1] == ':') {
> + if (apr_toupper(addroot[0]) == apr_toupper(baseroot[0])
> + && baseroot[1] == ':') {
> #endif
> /* Base the result path on the basepath
> */
>
> The call will return me "c:/windows/hi" and no error.
>
> (For Subversion the answers "c:/windows/hi" and "C:/windows/hi" are both valid as we normalize the resulting drive letter to upper case directly after reading it. Normalizing to upper case might be preferred for apr itself)
>
> Proposed log message:
> [[
> Use case insensitive drive letter comparison when making "C:hi"-like paths
> absolute on Windows
> ]]

How does Win32 handle Turkish? On Linux apr_toupper is locale aware
so in a Turkish locale (tr_TR) apr_toupper(i) != apr_toupper(I). Do
"i:/" and "I:/" refer to the same drive in Turkish? Does apr_toupper
have the same behaviour as drive letters?

-- 
Philip
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2415460
Received on 2009-11-07 21:41:37 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.