SHARE
TWEET

Untitled

a guest Jul 17th, 2017 168 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. From bfa175c4bbdcddea5c0e1ae8a8c560319f7e7804 Mon Sep 17 00:00:00 2001
  2. From: Thiago Macieira <thiago.macieira@nokia.com>
  3. Date: Fri, 14 Jan 2011 20:15:37 +0100
  4. Subject: [PATCH] QNAM FTP: switch to binary mode before sending a SIZE command
  5.  
  6. With some servers, SIZE is not allowed in ASCII mode or it may return
  7. different sizes. Since we transfer in binary anyway, better get the
  8. size in binary too.
  9.  
  10. Reviewed-by: pending
  11. ---
  12. src/network/access/qnetworkaccessftpbackend.cpp |    4 +++-
  13.  1 files changed, 3 insertions(+), 1 deletions(-)
  14.  
  15. diff --git a/src/network/access/qnetworkaccessftpbackend.cpp b/src/network/access/qnetworkaccessftpbackend.cpp
  16. index 42d2955..b0303aa 100644
  17. --- a/src/network/access/qnetworkaccessftpbackend.cpp
  18. +++ b/src/network/access/qnetworkaccessftpbackend.cpp
  19. @@ -307,8 +307,10 @@ void QNetworkAccessFtpBackend::ftpDone()
  20.              // logged in successfully, send the stat requests (if supported)
  21.              QString command = url().path();
  22.              command.prepend(QLatin1String("%1 "));
  23. -            if (supportsSize)
  24. +            if (supportsSize) {
  25. +                ftp->rawCommand(QLatin1String("TYPE I"));
  26.                  sizeId = ftp->rawCommand(command.arg(QLatin1String("SIZE"))); // get size
  27. +            }
  28.              if (supportsMdtm)
  29.                  mdtmId = ftp->rawCommand(command.arg(QLatin1String("MDTM"))); // get modified time
  30.              if (!supportsSize && !supportsMdtm)
  31. --
  32. 1.7.3.2.431.ge2f5c
RAW Paste Data
Top