MIME types and signatures are case insensitive.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13730 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// Copyright (c) 2001-2002, OpenBeOS
|
||||
// Copyright (c) 2001-2005, Haiku
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
@@ -250,7 +250,7 @@ AppInfoList::IndexOf(const char *signature) const
|
||||
{
|
||||
if (signature) {
|
||||
for (int32 i = 0; RosterAppInfo *info = InfoAt(i); i++) {
|
||||
if (!strcmp(info->signature, signature))
|
||||
if (!strcasecmp(info->signature, signature))
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// Copyright (c) 2001-2002, OpenBeOS
|
||||
// Copyright (c) 2001-2005, Haiku
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
@@ -199,7 +199,7 @@ RecentEntries::Get(int32 maxCount, const char *fileTypes[], int32 fileTypesCount
|
||||
char type[B_MIME_TYPE_LENGTH];
|
||||
if (GetTypeForRef(&(*item)->ref, type) == B_OK) {
|
||||
for (int i = 0; i < fileTypesCount; i++) {
|
||||
if (strcmp(type, fileTypes[i]) == 0) {
|
||||
if (strcasecmp(type, fileTypes[i]) == 0) {
|
||||
match = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -678,7 +678,7 @@ TRoster::HandleGetAppList(BMessage *request)
|
||||
for (AppInfoList::Iterator it(fRegisteredApps.It());
|
||||
RosterAppInfo *info = *it;
|
||||
++it) {
|
||||
if (!signature || !strcmp(signature, info->signature))
|
||||
if (!signature || !strcasecmp(signature, info->signature))
|
||||
reply.AddInt32("teams", info->team);
|
||||
}
|
||||
request->SendReply(&reply);
|
||||
|
||||
Reference in New Issue
Block a user