From: Jack Jansen Date: Tue, 5 Mar 1996 16:56:24 +0000 (+0000) Subject: Added code to make fsspecs work for gusi-python X-Git-Tag: v1.4b1~311 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=911ad6b0670cf990c486a701d3f85027ac669fb7;p=python Added code to make fsspecs work for gusi-python --- 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)) {