Fixed xdelta spawning on MacOS X.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 23 Mar 2005 22:21:32 +0000
changeset 77 809774c1e78d
parent 76 38a9ee7c1d44
child 78 55c90060fbc1
Fixed xdelta spawning on MacOS X.
platform_unix.c
--- a/platform_unix.c	Wed Mar 23 22:18:27 2005 +0000
+++ b/platform_unix.c	Wed Mar 23 22:21:32 2005 +0000
@@ -672,9 +672,11 @@
         argv[1] = NULL;
 
         /* Now that we know where xdelta will be, chdir out of AppBundle... */
-        ptr = strstr(realbuf, "/Contents/MacOS");
+        /* !!! FIXME: Fails if there are more than one of these in the string... */
+        ptr = strstr(realbuf, "/Contents/MacOS/");
         if (ptr != NULL)
         {
+            ptr++;  /* keep a '/' at the end of the string... */
             *ptr = '\0';
             chdir(realbuf);
         } /* if */