int QFtp::get(const QString &file, QIODevice *dev, TransferType type) { QStringList cmds; if (type == Binary) cmds << QLatin1String("TYPE I\r\n"); else cmds << QLatin1String("TYPE A\r\n"); cmds << QLatin1String("SIZE ") + file + QLatin1String("\r\n"); //moved to top of the SIZE to solve SIZE bug /*if (type == Binary) cmds << QLatin1String("TYPE I\r\n"); else cmds << QLatin1String("TYPE A\r\n"); */ cmds << QLatin1String(d_func()->transferMode == Passive ? "PASV\r\n" : "PORT\r\n"); cmds << QLatin1String("RETR ") + file + QLatin1String("\r\n"); return d_func()->addCommand(new QFtpCommand(Get, cmds, dev)); }