Ticket #2034: ExpanderRules_Ticket2034.diff
File ExpanderRules_Ticket2034.diff, 741 bytes (added by , 17 years ago) |
---|
-
ExpanderRules.cpp
122 122 { 123 123 int32 count = fList.CountItems(); 124 124 int32 length = fileName.Length(); 125 125 126 for (int32 i = 0; i < count; i++) { 126 127 ExpanderRule *rule = (ExpanderRule *)fList.ItemAt(i); 128 129 int32 extPosition = fileName.FindLast(rule->FilenameExtension()); 130 127 131 if ((rule->MimeType().IsValid() && rule->MimeType() == filetype) 128 || ( fileName.FindLast(rule->FilenameExtension())== (length - rule->FilenameExtension().Length())))132 || (extPosition!=-1 && extPosition == (length - rule->FilenameExtension().Length()))) 129 133 return rule; 130 134 } 135 131 136 return NULL; 132 137 } 133 138