diff Mac/Python/macgetpath.c @ 8247:7356d4888a8b legacy-trunk

An applet with Popt and GUSI preferences but without alis resource didn't work, because the resource file chain was incomplete when we tried to open the preference file. Fixed.
author Jack Jansen <jack.jansen@cwi.nl>
date Thu, 07 May 1998 13:08:58 +0000
parents 2984416a1b2b
children 6245b819bdd8
line wrap: on
line diff
--- a/Mac/Python/macgetpath.c	Thu May 07 12:58:57 1998 +0000
+++ b/Mac/Python/macgetpath.c	Thu May 07 13:08:58 1998 +0000
@@ -217,6 +217,7 @@
     /* First look for an override in the application file */
     UseResFile(PyMac_AppRefNum);
     handle = (AliasHandle)Get1Resource('alis', PYTHONHOMEOVERRIDE_ID);
+    UseResFile(oldrh);
     if ( handle != NULL ) {
     	homerh = PyMac_AppRefNum;
     } else {   
@@ -230,8 +231,8 @@
 	    }
 	    homerh = prefrh;
     }
-	/* It exists. Resolve it (possibly updating it) */
-	if ( ResolveAlias(NULL, handle, &dirspec, &modified) != noErr ) {
+    /* It exists. Resolve it (possibly updating it) */
+    if ( ResolveAlias(NULL, handle, &dirspec, &modified) != noErr ) {
     	(void)StopAlert(BADPREFFILE_ID, NULL);
     	diditbefore=1;
     	return ":";