Navigation Menu

Skip to content

Commit

Permalink
Don't parse Info.plist if there wasn't a product identifier specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed May 27, 2004
1 parent e77e46c commit 0995cc2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions platform_unix.c
Expand Up @@ -383,9 +383,10 @@ int chdir_by_identifier(const char *name, const char *str, const char *version)
Boolean b;
OSStatus rc;
int found = 0;
int hasident = ((str != NULL) && (*str));

/* if an identifier is specified, ask LaunchServices to find product... */
if ((str != NULL) && (*str))
if (hasident)
{
CFURLRef url = NULL;
CFStringRef id = CFStringCreateWithBytes(NULL, str, strlen(str),
Expand Down Expand Up @@ -427,7 +428,7 @@ int chdir_by_identifier(const char *name, const char *str, const char *version)
return(0);
} /* if */

return(parse_info_dot_plist(str, version));
return(hasident ? parse_info_dot_plist(str, version) : 1);
} /* chdir_by_identifier */


Expand Down

0 comments on commit 0995cc2

Please sign in to comment.