Don't parse Info.plist if there wasn't a product identifier specified.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 27 May 2004 12:43:58 +0000
changeset 26 d459ca2ce76e
parent 25 fb920893c233
child 27 569fe0e4038e
Don't parse Info.plist if there wasn't a product identifier specified.
platform_unix.c
--- a/platform_unix.c	Thu May 27 12:36:42 2004 +0000
+++ b/platform_unix.c	Thu May 27 12:43:58 2004 +0000
@@ -383,9 +383,10 @@
     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),
@@ -427,7 +428,7 @@
         return(0);
     } /* if */
 
-    return(parse_info_dot_plist(str, version));
+    return(hasident ? parse_info_dot_plist(str, version) : 1);
 } /* chdir_by_identifier */