Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From bfa175c4bbdcddea5c0e1ae8a8c560319f7e7804 Mon Sep 17 00:00:00 2001
- From: Thiago Macieira <thiago.macieira@nokia.com>
- Date: Fri, 14 Jan 2011 20:15:37 +0100
- Subject: [PATCH] QNAM FTP: switch to binary mode before sending a SIZE command
- With some servers, SIZE is not allowed in ASCII mode or it may return
- different sizes. Since we transfer in binary anyway, better get the
- size in binary too.
- Reviewed-by: pending
- ---
- src/network/access/qnetworkaccessftpbackend.cpp | 4 +++-
- 1 files changed, 3 insertions(+), 1 deletions(-)
- diff --git a/src/network/access/qnetworkaccessftpbackend.cpp b/src/network/access/qnetworkaccessftpbackend.cpp
- index 42d2955..b0303aa 100644
- --- a/src/network/access/qnetworkaccessftpbackend.cpp
- +++ b/src/network/access/qnetworkaccessftpbackend.cpp
- @@ -307,8 +307,10 @@ void QNetworkAccessFtpBackend::ftpDone()
- // logged in successfully, send the stat requests (if supported)
- QString command = url().path();
- command.prepend(QLatin1String("%1 "));
- - if (supportsSize)
- + if (supportsSize) {
- + ftp->rawCommand(QLatin1String("TYPE I"));
- sizeId = ftp->rawCommand(command.arg(QLatin1String("SIZE"))); // get size
- + }
- if (supportsMdtm)
- mdtmId = ftp->rawCommand(command.arg(QLatin1String("MDTM"))); // get modified time
- if (!supportsSize && !supportsMdtm)
- --
- 1.7.3.2.431.ge2f5c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement