kioslave: do not add trailing slash if there is one from file slave when listing

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-06-04 04:46:39 +03:00
parent 7e1088407e
commit 089c0ac111

View file

@ -359,7 +359,10 @@ void FileProtocol::listDir(const KUrl &url)
entry.clear();
const QString filename = QFile::decodeName(ep->d_name);
QString filepath = path + QDir::separator();
QString filepath = path;
if (!filepath.endsWith(QDir::separator())) {
filepath += QDir::separator();
}
if (filename != s_dot) {
filepath += filename;
}