mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
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:
parent
ed8815b5c9
commit
0d26e2c479
2 changed files with 1 additions and 9 deletions
|
@ -1761,13 +1761,9 @@ void ListJobPrivate::slotListEntries(const KIO::UDSEntryList &list)
|
||||||
foreach (const UDSEntry &entry, list) {
|
foreach (const UDSEntry &entry, list) {
|
||||||
|
|
||||||
KUrl itemURL;
|
KUrl itemURL;
|
||||||
#if 0
|
|
||||||
// FIXME: lists the directory twice if used
|
|
||||||
if (entry.contains(KIO::UDSEntry::UDS_URL)) {
|
if (entry.contains(KIO::UDSEntry::UDS_URL)) {
|
||||||
itemURL = entry.stringValue(KIO::UDSEntry::UDS_URL);
|
itemURL = entry.stringValue(KIO::UDSEntry::UDS_URL);
|
||||||
} else {
|
} else {
|
||||||
#endif
|
|
||||||
{
|
|
||||||
// no URL, use the name
|
// no URL, use the name
|
||||||
itemURL = q->url();
|
itemURL = q->url();
|
||||||
const QString fileName = entry.stringValue(KIO::UDSEntry::UDS_NAME);
|
const QString fileName = entry.stringValue(KIO::UDSEntry::UDS_NAME);
|
||||||
|
|
|
@ -65,8 +65,6 @@ using namespace KIO;
|
||||||
|
|
||||||
#define MAX_IPC_SIZE (1024*32)
|
#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)
|
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) {
|
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())) {
|
if (!filepath.endsWith(QDir::separator())) {
|
||||||
filepath += QDir::separator();
|
filepath += QDir::separator();
|
||||||
}
|
}
|
||||||
if (filename != s_dot) {
|
|
||||||
filepath += filename;
|
filepath += filename;
|
||||||
}
|
|
||||||
if (createUDSEntry(filename, filepath, entry, details)) {
|
if (createUDSEntry(filename, filepath, entry, details)) {
|
||||||
listEntry(entry, false);
|
listEntry(entry, false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue