[PHP-DEV] CVS update: php31/main From: rasmus (php-dev <email protected>)
Date: 10/30/98

Date: Friday October 30, 1998 @ 10:05
Author: rasmus

Update of /repository/php31/main
In directory asf:/u2/tmp/cvs-serv3830/main

Modified Files:
        php3_realpath.c
Log Message:
Apply a patch that was forgotten

Index: php31/main/php3_realpath.c
diff -c php31/main/php3_realpath.c:1.3 php31/main/php3_realpath.c:1.4
*** php31/main/php3_realpath.c:1.3 Thu Oct 29 17:04:19 1998
--- php31/main/php3_realpath.c Fri Oct 30 10:05:23 1998
***************
*** 54,60 ****
  
          char path_copy[MAXPATHLEN]; /* A work-copy of the path */
          char *workpos; /* working position in *path */
! #if !(WIN32|WINNT)
          char buf[MAXPATHLEN]; /* Buffer for readlink */
          int linklength; /* The result from readlink */
  #endif
--- 54,61 ----
  
          char path_copy[MAXPATHLEN]; /* A work-copy of the path */
          char *workpos; /* working position in *path */
!
! #if !(WIN32|WINNT)
          char buf[MAXPATHLEN]; /* Buffer for readlink */
          int linklength; /* The result from readlink */
  #endif
***************
*** 173,178 ****
--- 174,180 ----
                          while((*workpos != '\\') && (*workpos != 0)) {
                                  *workpos++;
                          }
+
                          /* Avoid double \ in the result */
                          writepos--;
                  }
***************
*** 185,191 ****
  #else /* WIN32|WINNT */
                  /* Look for .. */
                  if ((workpos[0] == '.') && (workpos[1] != 0)) {
! if ((workpos[1] == '.') && (workpos[2] == '/') || (workpos[2] == 0))) {
                                  /* One directory back */
                                  /* Set pointers to right position */
                                  workpos++; /* move to second '.' */
--- 187,193 ----
  #else /* WIN32|WINNT */
                  /* Look for .. */
                  if ((workpos[0] == '.') && (workpos[1] != 0)) {
! if ((workpos[1] == '.') && ((workpos[2] == '/') || (workpos[2] == 0))) {
                                  /* One directory back */
                                  /* Set pointers to right position */
                                  workpos++; /* move to second '.' */
***************
*** 199,206 ****
                          } else {
                                  if (workpos[1] == '/') {
                                          /* Found a /./ skip it */
! workpos++;
! /* move to '/' */
                                          /* Avoid double / in the result */
                                          writepos--;
                                  } else {
--- 201,208 ----
                          } else {
                                  if (workpos[1] == '/') {
                                          /* Found a /./ skip it */
! workpos++; /* move to '/' */
!
                                          /* Avoid double / in the result */
                                          writepos--;
                                  } else {

--
PHP Development Mailing List   http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe <email protected>
For help: php-dev-help <email protected>