Skip to content

Commit

Permalink
ipfs files ls needs l=true to provide hashes
Browse files Browse the repository at this point in the history
That's much more useful.  ipfs/kubo#5026
  • Loading branch information
ec1oud committed Jun 14, 2019
1 parent f4a5f86 commit 467bdb2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kioslave/ipfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 467bdb2

Please sign in to comment.