|
From: creedon <icr...@us...> - 2005-07-25 21:10:20
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2637 Modified Files: shell.c filepath.c Log Message: fix for FSMakeFSSpec problem; not retrieving default working directory upon first use of FSMakeFSSpec in program, see < 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.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** filepath.c 18 Jul 2005 21:29:34 -0000 1.6 --- filepath.c 25 Jul 2005 21:10:11 -0000 1.7 *************** *** 34,38 **** #include "ops.h" #include "file.h" ! --- 34,38 ---- #include "ops.h" #include "file.h" ! #include "launch.h" /* 2005-07-18 creedon */ *************** *** 44,49 **** static FSSpec fsdefault = {0}; /*we maintain our own default directory*/ - - boolean directorytopath (long DirID, short vnum, bigstring path) { --- 44,47 ---- *************** *** 256,260 **** return (true); ! #ifdef MACVERSION errcode = FSMakeFSSpec (fsdefault.vRefNum, fsdefault.parID, bspath, fs); --- 254,258 ---- return (true); ! #ifdef MACVERSION errcode = FSMakeFSSpec (fsdefault.vRefNum, fsdefault.parID, bspath, fs); *************** *** 411,412 **** --- 409,416 ---- #endif } /*getfsfile*/ + + void initfsdefault (void) { + /* 2005-07-18 creedon, karstenw */ + getapplicationfilespec (nil, &fsdefault); + } /* initfsdefault */ + \ No newline at end of file Index: shell.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shell.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** shell.c 14 Jan 2005 20:16:17 -0000 1.11 --- shell.c 25 Jul 2005 21:10:11 -0000 1.12 *************** *** 130,135 **** - - boolean shellgetstring (short id, bigstring bs) { --- 130,133 ---- *************** *** 1177,1181 **** if (!initmacintosh ()) return (showerrorandexit (notenoughmemorystring)); ! #ifdef MACVERSION //Code change by Timothy Paustian Friday, June 9, 2000 2:36:02 PM --- 1175,1179 ---- if (!initmacintosh ()) return (showerrorandexit (notenoughmemorystring)); ! #ifdef MACVERSION //Code change by Timothy Paustian Friday, June 9, 2000 2:36:02 PM *************** *** 1185,1188 **** --- 1183,1191 ---- if (gSystemVersion < 0x0700) return (showerrorandexit (archaicsystemstring)); + + initfsdefault (); /* 2005-07-18 creedon, karstenw - init fsdefault here, don't leave it up to an + FSMakeFSSpec call at some unknown time, see + < http://sourceforge.net/tracker/index.php?func=detail&aid=1239991&group_id=120666&atid=687798 > */ + #endif |