mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kioslave: use the full path to determine the MIME type in file slave
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
f34328e051
commit
ee4c56ad5e
1 changed files with 4 additions and 2 deletions
|
@ -654,8 +654,10 @@ bool FileProtocol::createUDSEntry(const QString &filename, const QByteArray &pat
|
|||
if (details > 1) {
|
||||
// In real "remote" slaves, this usually depends on the protocol but not here - it can be
|
||||
// determined from content, path or mode
|
||||
KMimeType::Ptr mt = KMimeType::findByPath(filename, buff.st_mode);
|
||||
entry.insert(KIO::UDSEntry::UDS_MIME_TYPE, mt->name());
|
||||
KMimeType::Ptr mt = KMimeType::findByPath(QFile::decodeName(path), buff.st_mode);
|
||||
if (!mt.isNull()) {
|
||||
entry.insert(KIO::UDSEntry::UDS_MIME_TYPE, mt->name());
|
||||
}
|
||||
}
|
||||
|
||||
if (details > 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue