Commit c9558516 authored by Ludger Dreier's avatar Ludger Dreier Committed by David Rosca

kio_obexftp: avoid duplicate slash when storing file stat

Check if url already ends in slash ("/"). Insert slash between folder
name and filename only if folder url does not end in slash.

BUG: 388626
FIXED-IN: 5.12.0
parent bef67363
......@@ -462,7 +462,12 @@ QList<KIO::UDSEntry> KioFtp::listFolder(const QUrl &url, bool *ok)
// Most probably the client of the kio will stat each file
// so since we are on it, let's cache all of them.
QUrl statUrl = url;
statUrl.setPath(statUrl.path() + QLatin1Char('/') + item.name());
if (statUrl.path().endsWith('/')) {
statUrl.setPath(statUrl.path() + item.name());
} else {
statUrl.setPath(statUrl.path() + QLatin1Char('/') + item.name());
}
if (!m_statMap.contains(statUrl.toDisplayString())) {
qCDebug(OBEXFTP) << "Stat:"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment