|
From: creedon <icr...@us...> - 2005-07-18 21:29:42
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13683 Modified Files: filepath.c Log Message: rollback to previous version code, need to come up with better solution to problem < http://sourceforge.net/tracker/index.php?func=detail&aid=1239991&group_id=120666&atid=687798 >. Index: filepath.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/filepath.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** filepath.c 18 Jul 2005 00:16:48 -0000 1.5 --- filepath.c 18 Jul 2005 21:29:34 -0000 1.6 *************** *** 35,43 **** #include "file.h" #define flaux false /*if true, we're running under the A/UX operating system*/ #ifdef MACVERSION ! static FSSpec fsdefault; // = {0}; /*we maintain our own default directory*/ boolean directorytopath (long DirID, short vnum, bigstring path) { --- 35,48 ---- #include "file.h" + + #define flaux false /*if true, we're running under the A/UX operating system*/ + #ifdef MACVERSION ! static FSSpec fsdefault = {0}; /*we maintain our own default directory*/ ! ! boolean directorytopath (long DirID, short vnum, bigstring path) { *************** *** 251,262 **** return (true); ! #ifdef MACVERSION ! ! #if TARGET_API_MAC_CARBON ! /* 2005-07-17 creedon - don't use FSMakeFSSpec to fill in default directory and volume, see < http://developer.apple.com/technotes/tn/tn2015.html >, ! not sure if this is best place to do this, seems like it might be better handled at application launch */ ! GetApplicationPackageFSSpecFromBundle (&fsdefault); ! #endif ! errcode = FSMakeFSSpec (fsdefault.vRefNum, fsdefault.parID, bspath, fs); --- 256,260 ---- return (true); ! #ifdef MACVERSION errcode = FSMakeFSSpec (fsdefault.vRefNum, fsdefault.parID, bspath, fs); *************** *** 413,430 **** #endif } /*getfsfile*/ - - OSErr GetApplicationPackageFSSpecFromBundle(FSSpecPtr theFSSpecPtr) { - /* 2005-07-17 creedon - see , < http://developer.apple.com/technotes/tn/tn2015.html > */ - OSErr err = fnfErr; - CFBundleRef myAppsBundle = CFBundleGetMainBundle(); - if (myAppsBundle == NULL) return err; - CFURLRef myBundleURL = CFBundleCopyBundleURL(myAppsBundle); - if (myBundleURL == NULL) return err; - - FSRef myBundleRef; - Boolean ok = CFURLGetFSRef(myBundleURL, &myBundleRef); - CFRelease(myBundleURL); - if (!ok) return err; - - return FSGetCatalogInfo(&myBundleRef, kFSCatInfoNone, NULL, NULL, theFSSpecPtr, NULL); - } \ No newline at end of file --- 411,412 ---- |