Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0072b8d

Browse files
committed
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.
1 parent 4775d0a commit 0072b8d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Mac/Python/macgetpath.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ PyMac_GetPythonDir()
217217
/* First look for an override in the application file */
218218
UseResFile(PyMac_AppRefNum);
219219
handle = (AliasHandle)Get1Resource('alis', PYTHONHOMEOVERRIDE_ID);
220+
UseResFile(oldrh);
220221
if ( handle != NULL ) {
221222
homerh = PyMac_AppRefNum;
222223
} else {
@@ -230,8 +231,8 @@ PyMac_GetPythonDir()
230231
}
231232
homerh = prefrh;
232233
}
233-
/* It exists. Resolve it (possibly updating it) */
234-
if ( ResolveAlias(NULL, handle, &dirspec, &modified) != noErr ) {
234+
/* It exists. Resolve it (possibly updating it) */
235+
if ( ResolveAlias(NULL, handle, &dirspec, &modified) != noErr ) {
235236
(void)StopAlert(BADPREFFILE_ID, NULL);
236237
diditbefore=1;
237238
return ":";

0 commit comments

Comments
 (0)