Now it also considers the MimeType of symlinks targets when proposing add-ons in tracker.

This fixes ticket #2775.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32246 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Saint-Pierre
2009-08-11 11:53:12 +00:00
parent 1592b6fb4c
commit 14347545f3
+9
View File
@@ -2786,6 +2786,15 @@ BContainerWindow::EachAddon(BPath &path, bool (*eachAddon)(const Model *,
for (int32 index = 0; index < count; index++) {
BPose *pose = PoseView()->SelectionList()->ItemAt(index);
AddMimeTypeString(mimeTypes, pose->TargetModel());
// If it's a symlink, resolves it and add the Target's MimeType
if (pose->TargetModel()->IsSymLink()) {
Model* resolved = new Model(
pose->TargetModel()->EntryRef(), true, true);
if (resolved->InitCheck() == B_OK) {
AddMimeTypeString(mimeTypes, resolved);
}
delete resolved;
}
}
}