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:
Axel Dörfler
2005-07-18 07:06:21 +00:00
parent a22dce79df
commit bb00e2687c
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -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 // Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"), // copy of this software and associated documentation files (the "Software"),
@@ -250,7 +250,7 @@ AppInfoList::IndexOf(const char *signature) const
{ {
if (signature) { if (signature) {
for (int32 i = 0; RosterAppInfo *info = InfoAt(i); i++) { for (int32 i = 0; RosterAppInfo *info = InfoAt(i); i++) {
if (!strcmp(info->signature, signature)) if (!strcasecmp(info->signature, signature))
return i; return i;
} }
} }
+2 -2
View File
@@ -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 // Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"), // 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]; char type[B_MIME_TYPE_LENGTH];
if (GetTypeForRef(&(*item)->ref, type) == B_OK) { if (GetTypeForRef(&(*item)->ref, type) == B_OK) {
for (int i = 0; i < fileTypesCount; i++) { for (int i = 0; i < fileTypesCount; i++) {
if (strcmp(type, fileTypes[i]) == 0) { if (strcasecmp(type, fileTypes[i]) == 0) {
match = true; match = true;
break; break;
} }
+1 -1
View File
@@ -678,7 +678,7 @@ TRoster::HandleGetAppList(BMessage *request)
for (AppInfoList::Iterator it(fRegisteredApps.It()); for (AppInfoList::Iterator it(fRegisteredApps.It());
RosterAppInfo *info = *it; RosterAppInfo *info = *it;
++it) { ++it) {
if (!signature || !strcmp(signature, info->signature)) if (!signature || !strcasecmp(signature, info->signature))
reply.AddInt32("teams", info->team); reply.AddInt32("teams", info->team);
} }
request->SendReply(&reply); request->SendReply(&reply);