cvs: pear-core /PEAR FTP.php
| From: | Greg Beaver | Date: | Sun, 19 Nov 2006 21:32:14 +0000 |
| Subject: | cvs: pear-core /PEAR FTP.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-5191@lists.php.net to get a copy of this message | ||
cellog Sun Nov 19 21:32:14 2006 UTC
Modified files:
/pear-core/PEAR FTP.php
Log:
attempted fix for Bug #9105
some files are truncated on upload
# I can't reproduce this bug, so this is an educated guess
http://cvs.php.net/viewvc.cgi/pear-core/PEAR/FTP.php?r1=1.10&r2=1.11&diff_format=u
Index: pear-core/PEAR/FTP.php
diff -u pear-core/PEAR/FTP.php:1.10 pear-core/PEAR/FTP.php:1.11
--- pear-core/PEAR/FTP.php:1.10 Thu Oct 19 23:28:05 2006
+++ pear-core/PEAR/FTP.php Sun Nov 19 21:32:14 2006
@@ -15,7 +15,7 @@
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: FTP.php,v 1.10 2006/10/19 23:28:05 cellog Exp $
+ * @version CVS: $Id: FTP.php,v 1.11 2006/11/19 21:32:14 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -209,6 +209,8 @@
public function put($localfile, $remotefile, $overwrite = false, $binary = true)
{
+ // sometimes we get the wrong size for files, this might fix it
+ clearstatcache();
$local = @fopen($localfile, 'r' . ($binary ? 'b' : ''));
if (!$local) {
return PEAR::raiseError('Could not put local file ' . $localfile .