summaryrefslogtreecommitdiff
path: root/ext/ftp/php_ftp.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-03-10 23:37:45 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-03-10 23:37:45 +0000
commitff80321587a3cfb0ee646ef2e952c08d00ca01a7 (patch)
treea1aa9aace38c86c4e9d0d05053ac4bd2bb2fa6e3 /ext/ftp/php_ftp.c
parente6034763ca9ab559e269a421a664ecac7ae4a769 (diff)
downloadphp-git-ff80321587a3cfb0ee646ef2e952c08d00ca01a7.tar.gz
Final set of fixes for bug #27633.
# Many thanks to Edin for helpind analyze and resolve this bug.
Diffstat (limited to 'ext/ftp/php_ftp.c')
-rw-r--r--ext/ftp/php_ftp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c
index c527696c6b..4fa30ef738 100644
--- a/ext/ftp/php_ftp.c
+++ b/ext/ftp/php_ftp.c
@@ -679,6 +679,10 @@ PHP_FUNCTION(ftp_get)
resumepos = 0;
}
+#ifdef PHP_WIN32
+ mode = FTPTYPE_IMAGE;
+#endif
+
if (ftp->autoseek && resumepos) {
outstream = php_stream_open_wrapper(local, mode == FTPTYPE_ASCII ? "rt+" : "rb+", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL);
if (outstream == NULL) {
@@ -737,7 +741,9 @@ PHP_FUNCTION(ftp_nb_get)
if (!ftp->autoseek && resumepos == PHP_FTP_AUTORESUME) {
resumepos = 0;
}
-
+#ifdef PHP_WIN32
+ mode = FTPTYPE_IMAGE;
+#endif
if (ftp->autoseek && resumepos) {
outstream = php_stream_open_wrapper(local, mode == FTPTYPE_ASCII ? "rt+" : "rb+", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL);
if (outstream == NULL) {