pajoye          Thu Jan  1 19:32:45 2009 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/zip/lib        zip_open.c 
  Log:
  - restore overwrite feature (regression introduced in 5.2.8)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/lib/zip_open.c?r1=1.1.2.10&r2=1.1.2.11&diff_format=u
Index: php-src/ext/zip/lib/zip_open.c
diff -u php-src/ext/zip/lib/zip_open.c:1.1.2.10 
php-src/ext/zip/lib/zip_open.c:1.1.2.11
--- php-src/ext/zip/lib/zip_open.c:1.1.2.10     Wed Dec 31 11:17:47 2008
+++ php-src/ext/zip/lib/zip_open.c      Thu Jan  1 19:32:45 2009
@@ -68,7 +68,10 @@
     
     switch (_zip_file_exists(fn, flags, zep)) {
     case -1:
+                       if (!(flags & ZIP_OVERWRITE)) {
        return NULL;
+                       }
+                       
     case 0:
        return _zip_allocate_new(fn, zep);
     default:
@@ -440,7 +443,7 @@
     }
     
     if (stat(fn, &st) != 0) {
-       if (flags & ZIP_CREATE)
+       if (flags & ZIP_CREATE || flags & ZIP_OVERWRITE)
            return 0;
        else {
            set_error(zep, NULL, ZIP_ER_OPEN);



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

Reply via email to