Tracker now uses the name of the symlink for add-ons, instead of resolving it first.
This fixes bug #602. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19704 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3bf2d61a46
commit
1130b709ac
|
@ -179,9 +179,10 @@ MatchOne(const Model *model, void *castToName)
|
||||||
uint32 dummy;
|
uint32 dummy;
|
||||||
StripShortcut(model, buffer, dummy);
|
StripShortcut(model, buffer, dummy);
|
||||||
|
|
||||||
if (strcmp(buffer, (const char *)castToName) == 0)
|
if (strcmp(buffer, (const char *)castToName) == 0) {
|
||||||
// found match, bail out
|
// found match, bail out
|
||||||
return model;
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -2720,23 +2721,25 @@ BContainerWindow::EachAddon(BPath &path, bool (*eachAddon)(const Model *,
|
||||||
|
|
||||||
dir.Rewind();
|
dir.Rewind();
|
||||||
while (dir.GetNextEntry(&entry) == B_OK) {
|
while (dir.GetNextEntry(&entry) == B_OK) {
|
||||||
bool primary = false;
|
|
||||||
|
|
||||||
if (entry.IsSymLink()) {
|
|
||||||
// resolve symlinks if needed
|
|
||||||
entry_ref ref;
|
|
||||||
entry.GetRef(&ref);
|
|
||||||
entry.SetTo(&ref, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
Model *model = new Model(&entry);
|
Model *model = new Model(&entry);
|
||||||
if (model->InitCheck() != B_OK || !model->IsExecutable()) {
|
|
||||||
|
if (model->InitCheck() == B_OK && model->IsSymLink()) {
|
||||||
|
// resolve symlinks
|
||||||
|
Model* resolved = new Model(model->EntryRef(), true, true);
|
||||||
|
if (resolved->InitCheck() == B_OK)
|
||||||
|
model->SetLinkTo(resolved);
|
||||||
|
else
|
||||||
|
delete resolved;
|
||||||
|
}
|
||||||
|
if (model->InitCheck() != B_OK || !model->ResolveIfLink()->IsExecutable()) {
|
||||||
delete model;
|
delete model;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if it supports at least one of the selected entries
|
// check if it supports at least one of the selected entries
|
||||||
|
|
||||||
|
bool primary = false;
|
||||||
|
|
||||||
if (mimeTypes.CountItems()) {
|
if (mimeTypes.CountItems()) {
|
||||||
BFile file(&entry, B_READ_ONLY);
|
BFile file(&entry, B_READ_ONLY);
|
||||||
if (file.InitCheck() == B_OK) {
|
if (file.InitCheck() == B_OK) {
|
||||||
|
|
Loading…
Reference in New Issue