helly           Sat Mar  3 14:46:44 2007 UTC

  Modified files:              
    /php-src/ext/spl    spl_directory.c 
  Log:
  # This block got lost somehow
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.122&r2=1.123&diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.122 
php-src/ext/spl/spl_directory.c:1.123
--- php-src/ext/spl/spl_directory.c:1.122       Sat Mar  3 14:37:17 2007
+++ php-src/ext/spl/spl_directory.c     Sat Mar  3 14:46:44 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: spl_directory.c,v 1.122 2007/03/03 14:37:17 helly Exp $ */
+/* $Id: spl_directory.c,v 1.123 2007/03/03 14:46:44 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -675,6 +675,18 @@
                }
        }
 
+       if (intern->path_len && intern->path_len < intern->file_name_len) {
+               if (intern->file_name_type == IS_UNICODE) {
+                       fname.u = intern->file_name.u + intern->path_len + 1;
+               } else {
+                       fname.s = intern->file_name.s + intern->path_len + 1;
+               }
+               flen = intern->file_name_len - (intern->path_len + 1);
+       } else {
+               fname = intern->file_name;
+               flen = intern->file_name_len;
+       }
+
        if (intern->file_name_type == IS_UNICODE) {     
                php_u_basename(fname.u, flen, suffix.u, slen, &fname.u, &flen 
TSRMLS_CC);
        } else {

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

Reply via email to