kioslave: curl slave review

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-03-19 22:04:36 +02:00
parent b266599a69
commit 485f5add57
2 changed files with 6 additions and 5 deletions

View file

@ -1045,13 +1045,14 @@ QList<KIO::UDSEntry> CurlProtocol::udsEntries()
continue; continue;
} }
// now take out everything but the filepath parts
const QByteArray ftpmode = lineparts.at(0); const QByteArray ftpmode = lineparts.at(0);
const QByteArray ftpowner = lineparts.at(2); const QByteArray ftpowner = lineparts.at(2);
const QByteArray ftpgroup = lineparts.at(3); const QByteArray ftpgroup = lineparts.at(3);
const qlonglong ftpsize = lineparts.at(4).toLongLong(); const qlonglong ftpsize = lineparts.at(4).toLongLong();
// now take out everything but the filepath parts
lineparts = lineparts.mid(8); lineparts = lineparts.mid(8);
// and finally the filepath parts
QByteArray ftpfilepath; QByteArray ftpfilepath;
foreach (const QByteArray &filepart, lineparts) { foreach (const QByteArray &filepart, lineparts) {
ftpfilepath.append(filepart); ftpfilepath.append(filepart);

View file

@ -16,8 +16,8 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef KDELIBS_HTTP_H #ifndef KIO_CURL_H
#define KDELIBS_HTTP_H #define KIO_CURL_H
#include <kurl.h> #include <kurl.h>
#include <kio/slavebase.h> #include <kio/slavebase.h>
@ -60,4 +60,4 @@ private:
struct curl_slist* m_curlquotes; struct curl_slist* m_curlquotes;
}; };
#endif // KDELIBS_HTTP_H #endif // KIO_CURL_H