iliaa           Fri Sep 19 22:52:46 2003 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src    NEWS 
    /php-src/ext/standard       dir.c 
  Log:
  MFH: Fixed bug #25583 (Incorrect handling of paths starting with / on win32
  inside glob() function).
  
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.400 php-src/NEWS:1.1247.2.401
--- php-src/NEWS:1.1247.2.400   Fri Sep 19 21:41:45 2003
+++ php-src/NEWS        Fri Sep 19 22:52:44 2003
@@ -7,7 +7,8 @@
 - Fixed crash bug when non-existing save/serializer handler was used. (Jani)
 - Fixed memory leak in gethostbynamel() if an error occurs. (Sara)
 - Fixed FastCGI being unable to bind to a specific IP. (Sascha)
-- Fixed bug #25583 (Incorrect handling of absolute path without drive). (Ilia)
+- Fixed bug #25583 (Incorrect handling of paths starting with / on win32 
+  inside glob() function). (Ilia)
 - Fixed bug #25570 (Possible crash in apache2handler when zend_bailout called
   outside of zend_try {} block). (Ilia)
 - Fixed bug #25530 (checkdate() incorrectly handles floats). (Ilia)
Index: php-src/ext/standard/dir.c
diff -u php-src/ext/standard/dir.c:1.109.2.10 php-src/ext/standard/dir.c:1.109.2.11
--- php-src/ext/standard/dir.c:1.109.2.10       Wed Jul 23 17:41:53 2003
+++ php-src/ext/standard/dir.c  Fri Sep 19 22:52:45 2003
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: dir.c,v 1.109.2.10 2003/07/23 21:41:53 iliaa Exp $ */
+/* $Id: dir.c,v 1.109.2.11 2003/09/20 02:52:45 iliaa Exp $ */
 
 /* {{{ includes/startup/misc */
 
@@ -371,6 +371,11 @@
                        cwd[0] = '\0';
                }
                cwd_skip = strlen(cwd)+1;
+#ifdef PHP_WIN32
+               if (IS_SLASH(cwd[0]) && !IS_UNC_PATH(pattern, pattern_len)) {
+                       cwd[2] = '\0';
+               }
+#endif
                snprintf(work_pattern, MAXPATHLEN, "%s%c%s", cwd, DEFAULT_SLASH, 
pattern);
                pattern = work_pattern;
        } 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to