cvs: pecl /zip php_zip.c
| From: | Pierre-Alain Joye | Date: | Fri, 20 Oct 2006 14:25:49 +0000 |
| Subject: | cvs: pecl /zip php_zip.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-6523@lists.php.net to get a copy of this message | ||
pajoye Fri Oct 20 14:25:49 2006 UTC
Modified files:
/pecl/zip php_zip.c
Log:
- #9082, work around for bad paths like path/to//foo on windows
php 5.2+ have the fix in mkdir directly
http://cvs.php.net/viewvc.cgi/pecl/zip/php_zip.c?r1=1.80&r2=1.81&diff_format=u
Index: pecl/zip/php_zip.c
diff -u pecl/zip/php_zip.c:1.80 pecl/zip/php_zip.c:1.81
--- pecl/zip/php_zip.c:1.80 Sat Oct 7 22:59:38 2006
+++ pecl/zip/php_zip.c Fri Oct 20 14:25:49 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_zip.c,v 1.80 2006/10/07 22:59:38 bjori Exp $ */
+/* $Id: php_zip.c,v 1.81 2006/10/20 14:25:49 pajoye Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -125,6 +125,18 @@
/* let see if the path already exists */
if (php_stream_stat_path(file_dirname_fullpath, &ssb) < 0) {
+
+#if defined(PHP_WIN32) && (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 1)
+ char *e;
+ e = file_dirname_fullpath;
+ while (*e) {
+ if (*e == '/') {
+ *e = DEFAULT_SLASH;
+ }
+ e++;
+ }
+#endif
+
ret = php_stream_mkdir(file_dirname_fullpath, 0777, PHP_STREAM_MKDIR_RECURSIVE, NULL);
if (!ret) {
efree(file_dirname_fullpath);
@@ -1967,7 +1979,7 @@
php_info_print_table_start();
php_info_print_table_row(2, "Zip", "enabled");
- php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.80 2006/10/07
22:59:38 bjori Exp $");
+ php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.81 2006/10/20
14:25:49 pajoye Exp $");
php_info_print_table_row(2, "Zip version", "@PACKAGE_VERSION@");
php_info_print_table_row(2, "Libzip version", "0.7.1");