apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Erenkrantz" <jus...@erenkrantz.com>
Subject Re: svn commit: r422157 - /apr/apr/trunk/file_io/win32/filepath.c
Date Mon, 17 Jul 2006 18:10:01 GMT
On 7/17/06, Colm MacCarthaigh <colm@stdlib.net> wrote:
> maybe there's a case for modifying apr_filepath_get on win32 here, to
> use the same canonicalised format? We're probably not the only people
> likely to perform these kind of niaive string comparisons, and we're
> supposed to know our own codebase ;-)

++1.  Something like below?  -- justin

Index: filesys.c
===================================================================
--- filesys.c   (revision 421960)
+++ filesys.c   (working copy)
@@ -193,6 +193,9 @@
     }
 #endif
     if (!(flags & APR_FILEPATH_NATIVE)) {
+        if (path[0] != '\\') {
+            path[0] = apr_toupper(path[0]);
+        }
         for (*rootpath = path; **rootpath; ++*rootpath) {
             if (**rootpath == '\\')
                 **rootpath = '/';

Mime
View raw message