If path is a symlink then examine its target.

BUG: 163738

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=819655
This commit is contained in:
Jakub Stachowski 2008-06-11 17:26:36 +00:00
parent 5de60cbd42
commit 795129a4ad

View File

@ -93,10 +93,14 @@ class RunnerContext::Private : public QSharedData
type = NetworkLocation;
} else if (QFile::exists(path)) {
QFileInfo info(path);
if (info.isSymLink()) {
path = info.canonicalFilePath();
info = QFileInfo(path);
}
if (info.isDir()) {
type = Directory;
mimeType = "inode/folder";
} else {
} else if (info.isFile()) {
type = File;
KMimeType::Ptr mimeTypePtr = KMimeType::findByPath(path);
if (mimeTypePtr) {