Using only mime types now work (bug from Fredrik Ekdahl, thanks!)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11175 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5797cdc36f
commit
bf8c5a0440
@ -143,8 +143,8 @@ ExpanderRules::MatchingRule(BString &fileName, const char *filetype)
|
|||||||
int32 length = fileName.Length();
|
int32 length = fileName.Length();
|
||||||
for (int32 i=0; i<count; i++) {
|
for (int32 i=0; i<count; i++) {
|
||||||
ExpanderRule *rule = (ExpanderRule *)fList.ItemAt(i);
|
ExpanderRule *rule = (ExpanderRule *)fList.ItemAt(i);
|
||||||
if (((!rule->MimeType().IsValid()) || (rule->MimeType()==filetype))
|
if ((rule->MimeType().IsValid() && (rule->MimeType()==filetype))
|
||||||
&& (fileName.FindLast(rule->FilenameExtension())==(length-rule->FilenameExtension().Length())))
|
|| (fileName.FindLast(rule->FilenameExtension())==(length-rule->FilenameExtension().Length())))
|
||||||
return rule;
|
return rule;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user