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:
@@ -2786,6 +2786,15 @@ BContainerWindow::EachAddon(BPath &path, bool (*eachAddon)(const Model *,
|
|||||||
for (int32 index = 0; index < count; index++) {
|
for (int32 index = 0; index < count; index++) {
|
||||||
BPose *pose = PoseView()->SelectionList()->ItemAt(index);
|
BPose *pose = PoseView()->SelectionList()->ItemAt(index);
|
||||||
AddMimeTypeString(mimeTypes, pose->TargetModel());
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user