From 467bdb27e8c681b4993b0af0dc2c3da9c21d5298 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 11 Jun 2019 10:22:01 +0200 Subject: [PATCH] ipfs files ls needs l=true to provide hashes That's much more useful. https://github.com/ipfs/go-ipfs/issues/5026 --- kioslave/ipfs.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kioslave/ipfs.cpp b/kioslave/ipfs.cpp index a779305..7becd54 100644 --- a/kioslave/ipfs.cpp +++ b/kioslave/ipfs.cpp @@ -90,10 +90,9 @@ void IpfsSlave::listDir(const QUrl &url) urlString = urlString.mid(6); m_apiUrl = m_baseUrl; // files/ls happens to work for both local unixfs and for hashes - // but files/ls doesn't provide type, size, or hash - a bug perhaps? m_apiUrl.setPath(m_baseUrl.path(QUrl::DecodeReserved) + (unixFs ? QLatin1String("files/ls") : QLatin1String("ls"))); - m_apiUrl.setQuery("arg=" + urlString); + m_apiUrl.setQuery(QLatin1String("arg=") + urlString + QLatin1String("&l=true")); qDebug() << Q_FUNC_INFO << url << urlString << m_apiUrl.toString(); m_reply = m_nam.get(QNetworkRequest(m_apiUrl)); connect(m_reply, &QNetworkReply::finished, this, &IpfsSlave::onLsReceiveDone);