apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr/file_io/win32 open.c
Date Wed, 05 Sep 2001 04:49:08 GMT
wrowe       01/09/04 21:49:08

  Modified:    file_io/win32 open.c
  Log:
    Matt astutely observed that we were only long-pathing the filename iff
    the path was slash delimited.  Provide for backslash delimiters.
  
    Note all our canonicalization refuses to speak \\?\ (and backs it out,
    if it's encountered) since this is entirely unportable even to Win9x.
    Therefore we don't have to worry about encountering it here.
  
  Submitted by:	Mats Nilsson <mats.nilsson@xware.se>
  
  Revision  Changes    Path
  1.81      +3 -2      apr/file_io/win32/open.c
  
  Index: open.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/win32/open.c,v
  retrieving revision 1.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- open.c	2001/07/30 03:12:28	1.80
  +++ open.c	2001/09/05 04:49:08	1.81
  @@ -84,12 +84,13 @@
       int retremains = srcremains;
       apr_wchar_t *t = retstr;
       apr_status_t rv;
  -    if (srcstr[1] == ':' && srcstr[2] == '/') {
  +    if (srcstr[1] == ':' && (srcstr[2] == '/' || srcstr[2] == '\\')) {
           wcscpy (retstr, L"\\\\?\\");
           retlen -= 4;
           t += 4;
       }
  -    else if (srcstr[0] == '/' && srcstr[1] == '/') {
  +    else if ((srcstr[0] == '/' || srcstr[0] == '\\')
  +          && (srcstr[1] == '/' || srcstr[1] == '\\')) {
           /* Skip the slashes */
           srcstr += 2;
           wcscpy (retstr, L"\\\\?\\UNC\\");
  
  
  

Mime
View raw message