|
From: Andre R. <and...@us...> - 2004-10-26 21:50:31
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9929/Frontier/Common/source Modified Files: filepath.c Log Message: In the Mac version of setfsfile, commented out some code for dealing with directories. It is not clear that the code does what the original author thought it should do, and since no caller ever seems to have passed in a directory anyway, this may not have been a problem until now. However, for the Carbon/Mach-O version, shellopendefaultfile passes in the spec for our app bundle to obtain the location of Frontier.root, but the now-disabled code did not return the proper result. Index: filepath.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/filepath.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** filepath.c 23 Oct 2004 22:19:09 -0000 1.2 --- filepath.c 26 Oct 2004 21:50:10 -0000 1.3 *************** *** 310,317 **** boolean setfsfile (tyfilespec *fs, bigstring bsfile) { #ifdef MACVERSION CInfoPBRec pb; ! if (getmacfileinfo (fs, &pb) && foldertest (&pb)) { --- 310,331 ---- boolean setfsfile (tyfilespec *fs, bigstring bsfile) { + + /* + 2004-10-26 aradke: Since the getmacfileinfo/foldertest gymnastics do not + seem to fit any particular purpose and since none of our callers + seem to rely it since they usually pass in a file rather than a directory, + I commented it out. + + The only time we get called with a directory is apparently by + shellopendefaultfile on startup in the Carbon/Mach-O build. + getapplicationfilespec returns a directory in that case and + the code below somehow screwed up when called to set the + filename to Frontier.root so that it wouldn't be found. + */ #ifdef MACVERSION + /* CInfoPBRec pb; ! if (getmacfileinfo (fs, &pb) && foldertest (&pb)) { *************** *** 320,323 **** --- 334,338 ---- return (false); } + */ copystring (bsfile, (*fs).name); |