kioslave: add the filename even if it is dot from file slave

passes tests

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-06-04 16:18:30 +03:00
parent ed8815b5c9
commit 0d26e2c479
2 changed files with 1 additions and 9 deletions

View file

@ -1761,13 +1761,9 @@ void ListJobPrivate::slotListEntries(const KIO::UDSEntryList &list)
foreach (const UDSEntry &entry, list) {
KUrl itemURL;
#if 0
// FIXME: lists the directory twice if used
if (entry.contains(KIO::UDSEntry::UDS_URL)) {
itemURL = entry.stringValue(KIO::UDSEntry::UDS_URL);
} else {
#endif
{
// no URL, use the name
itemURL = q->url();
const QString fileName = entry.stringValue(KIO::UDSEntry::UDS_NAME);

View file

@ -65,8 +65,6 @@ using namespace KIO;
#define MAX_IPC_SIZE (1024*32)
static const QLatin1String s_dot = QLatin1String(".");
static bool same_inode(const KDE_struct_stat &src, const KDE_struct_stat &dest)
{
if (src.st_ino == dest.st_ino && src.st_dev == dest.st_dev) {
@ -363,9 +361,7 @@ void FileProtocol::listDir(const KUrl &url)
if (!filepath.endsWith(QDir::separator())) {
filepath += QDir::separator();
}
if (filename != s_dot) {
filepath += filename;
}
filepath += filename;
if (createUDSEntry(filename, filepath, entry, details)) {
listEntry(entry, false);
}