cvs: php-src(PHP_5_3) /ext/standard ftp_fopen_wrapper.c
| From: | Felipe Pena | Date: | Fri, 11 Jul 2008 18:33:35 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /ext/standard ftp_fopen_wrapper.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-51026@lists.php.net to get a copy of this message | ||
felipe Fri Jul 11 18:33:35 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/standard ftp_fopen_wrapper.c
Log:
- MFB: Fixed bug #45449 (filesize() regression using ftp wrapper) (patch by crrodriguez at suse
dot de)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/ftp_fopen_wrapper.c?r1=1.85.2.4.2.4.2.5&r2=1.85.2.4.2.4.2.6&diff_format=u
Index: php-src/ext/standard/ftp_fopen_wrapper.c
diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.85.2.4.2.4.2.5
php-src/ext/standard/ftp_fopen_wrapper.c:1.85.2.4.2.4.2.6
--- php-src/ext/standard/ftp_fopen_wrapper.c:1.85.2.4.2.4.2.5 Tue Jan 8 19:08:50 2008
+++ php-src/ext/standard/ftp_fopen_wrapper.c Fri Jul 11 18:33:35 2008
@@ -18,7 +18,7 @@
| Sara Golemon <pollita@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: ftp_fopen_wrapper.c,v 1.85.2.4.2.4.2.5 2008/01/08 19:08:50 iliaa Exp $ */
+/* $Id: ftp_fopen_wrapper.c,v 1.85.2.4.2.4.2.6 2008/07/11 18:33:35 felipe Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -775,6 +775,13 @@
}
php_stream_write_string(stream, "TYPE I\r\n"); /* we need this since some servers refuse
to accept SIZE command in ASCII mode */
+
+ result = GET_FTP_RESULT(stream);
+
+ if(result < 200 || result > 299) {
+ goto stat_errexit;
+ }
+
php_stream_printf(stream TSRMLS_CC, "SIZE %s\r\n", (resource->path != NULL ?
resource->path : "/"));
result = GET_FTP_RESULT(stream);
if (result < 200 || result > 299) {