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:
parent
5de60cbd42
commit
795129a4ad
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user