mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Better handling of MIME types.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11769 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ed25d4ea76
commit
089b76e674
1 changed files with 13 additions and 4 deletions
|
@ -120,7 +120,7 @@ main(int argc, char** argv, char **env)
|
|||
[fileContents appendFormat: @"#TryExec=%@.app\n", entry];
|
||||
}
|
||||
|
||||
list = [plist objectForKey: @"Types"];
|
||||
list = [plist objectForKey: @"NSTypes"];
|
||||
if (list != nil)
|
||||
{
|
||||
int i;
|
||||
|
@ -128,10 +128,19 @@ main(int argc, char** argv, char **env)
|
|||
[fileContents appendString: @"MimeType="];
|
||||
for (i = 0; i < [list count]; i++)
|
||||
{
|
||||
NSArray *types;
|
||||
int j;
|
||||
|
||||
plist = [list objectAtIndex: i];
|
||||
entry = [plist objectForKey: @"NSMIMETypes"];
|
||||
if (entry != nil)
|
||||
[fileContents appendFormat: @"%@;", entry];
|
||||
types = [plist objectForKey: @"NSMIMETypes"];
|
||||
if (types != nil)
|
||||
{
|
||||
for (j = 0; j < [types count]; j++)
|
||||
{
|
||||
entry = [types objectAtIndex: j];
|
||||
[fileContents appendFormat: @"%@;", entry];
|
||||
}
|
||||
}
|
||||
}
|
||||
[fileContents appendString: @"\n"];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue