]> granicus.if.org Git - python/commitdiff
An applet with Popt and GUSI preferences but without alis resource
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 7 May 1998 13:08:58 +0000 (13:08 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 7 May 1998 13:08:58 +0000 (13:08 +0000)
didn't work, because the resource file chain was incomplete when we
tried to open the preference file. Fixed.

Mac/Python/macgetpath.c

index 98abbd875c33c9bf27f44d063e6ce7df7f238dc6..80918fd6db07d0bcdf40e587baeac83b083ea329 100644 (file)
@@ -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 ":";