note 114840 added to ziparchive.addfile

From: Date: Sun, 13 Apr 2014 04:48:13 +0000
Subject: note 114840 added to ziparchive.addfile
Groups: php.notes 
Request: Send a blank email to php-notes+get-199256@lists.php.net to get a copy of this message
The manual is lying. "In short, it means you can first delete an added file after the archive is closed. " Thats true but not by locking the file... Warning! This method works asynchronous! It seems that addFile() will return TRUE if the file stat command returns correctly, but the operation itself will not happen yet. Instead, deleting a file is always possible. I have discovered this behaviour by using a temporary file and deleting it immediately after addFile() returns. The result was that no archive was created nor any file was added although every operation (creating,open(),addFile()) returned true before. The operation silenty fails. ---- Server IP: 87.106.1.137 Probable Submitter: 84.112.102.108 ---- Manual Page -- http://php.net/manual/en/ziparchive.addfile.php Edit -- https://master.php.net/note/edit/114840 Del: integrated -- https://master.php.net/note/delete/114840/integrated Del: useless -- https://master.php.net/note/delete/114840/useless Del: bad code -- https://master.php.net/note/delete/114840/bad+code Del: spam -- https://master.php.net/note/delete/114840/spam Del: non-english -- https://master.php.net/note/delete/114840/non-english Del: in docs -- https://master.php.net/note/delete/114840/in+docs Del: other reasons-- https://master.php.net/note/delete/114840 Reject -- https://master.php.net/note/reject/114840 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#199256) next »