ID:               50349
 Updated by:       j...@php.net
 Reported By:      c dot hugot at uniteam dot fr
-Status:           Open
+Status:           Feedback
-Bug Type:         Output Control
+Bug Type:         Zip Related
 Operating System: windows xp with wamp
 PHP Version:      5.3SVN-2009-12-01 (SVN)
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.




Previous Comments:
------------------------------------------------------------------------

[2009-12-01 08:45:39] c dot hugot at uniteam dot fr

Description:
------------
I create an archive (.zip) with class ZipArchive, with four files into.

And when I want to delete the last file, in this archive, the function
deleteName() return true, but the file is not remove from the archive.
The three others files were correctly remove, but not the last.

Reproduce code:
---------------
---
>From manual page: function.ziparchive-deletename
---

        private function myDelZipFile($p_sName){
            $l_oZip = new ZipArchive();                       
            if($l_oZip->open(RACCORDEMENT_ZIP_FILE_PATH . "/" .
$_SESSION['step5']['zip_name'] . ".zip", ZIPARCHIVE::OVERWRITE) ===
true){
                $l_oZip->deleteName( $_SESSION['step5'][$p_sName .
'_name']) === true;
                $l_oZip->close();                
                return true;
            }            
            return false;            
        }

Expected result:
----------------
The archive file ever contained the last file. 

Actual result:
--------------
The archive would be empty.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50349&edit=1

Reply via email to