From 911ad6b0670cf990c486a701d3f85027ac669fb7 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Tue, 5 Mar 1996 16:56:24 +0000 Subject: [PATCH] Added code to make fsspecs work for gusi-python --- Mac/Python/macglue.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Mac/Python/macglue.c b/Mac/Python/macglue.c index 23415eb8b5..dd4499e32f 100644 --- a/Mac/Python/macglue.c +++ b/Mac/Python/macglue.c @@ -49,6 +49,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifdef __MWERKS__ #include #endif +#ifdef USE_GUSI +#include /* For Path2FSSpec */ +#endif #ifndef HAVE_UNIVERSAL_HEADERS #define GetResourceSizeOnDisk(x) SizeResource(x) @@ -654,8 +657,21 @@ PyMac_GetFSSpec(PyObject *v, FSSpec *fs) /* It's a pathname */ if( !PyArg_Parse(v, "O&", PyMac_GetStr255, &path) ) return 0; +#ifdef USE_GUSI + { + FSSpec curdirfss; + + if ( Path2FSSpec(":x", &curdirfss) == 0 ) { + refnum = curdirfss.vRefNum; + parid = curdirfss.parID; + } else { + return 0; + } + } +#else refnum = 0; /* XXXX Should get CurWD here... */ parid = 0; +#endif } else { if( !PyArg_Parse(v, "(hlO&); FSSpec should be fullpath or (vrefnum,dirid,path)", &refnum, &parid, PyMac_GetStr255, &path)) { -- 2.50.1