From: Jack Jansen Date: Thu, 7 May 1998 13:08:58 +0000 (+0000) Subject: An applet with Popt and GUSI preferences but without alis resource X-Git-Tag: v1.5.2a1~726 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0072b8d994264ab413d5e52ddfe4a666a671aa2f;p=python 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. --- diff --git a/Mac/Python/macgetpath.c b/Mac/Python/macgetpath.c index 98abbd875c..80918fd6db 100644 --- a/Mac/Python/macgetpath.c +++ b/Mac/Python/macgetpath.c @@ -217,6 +217,7 @@ PyMac_GetPythonDir() /* 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 @@ PyMac_GetPythonDir() } 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 ":";