pajoye          Fri Jan  2 00:22:21 2009 UTC

  Modified files:              
    /php-src/ext/zip/lib        zip_open.c 
  Log:
  - MFB: 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.8&r2=1.9&diff_format=u
Index: php-src/ext/zip/lib/zip_open.c
diff -u php-src/ext/zip/lib/zip_open.c:1.8 php-src/ext/zip/lib/zip_open.c:1.9
--- php-src/ext/zip/lib/zip_open.c:1.8  Wed Dec 31 11:12:38 2008
+++ php-src/ext/zip/lib/zip_open.c      Fri Jan  2 00:22:21 2009
@@ -66,9 +66,13 @@
     int i;
     off_t len;
     
+
     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 +444,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