In MachoPython expect Unix-style pathnames for both FSSpec and FSRef initializers. TBD: Do the reverse for MacPython, and also handle as_pathname().
diff --git a/Mac/Modules/macfsmodule.c b/Mac/Modules/macfsmodule.c
index 6dba578..2c4f2b3 100644
--- a/Mac/Modules/macfsmodule.c
+++ b/Mac/Modules/macfsmodule.c
@@ -1189,11 +1189,21 @@
if (_mfs_GetFSSpecFromFSRef(v, fs))
return 1;
if ( PyString_Check(v) ) {
+#if TARGET_API_MAC_OSX
+ FSRef fsr;
+
+ if ( !PyMac_GetFSRef(v, &fsr) )
+ return 0;
+ if ( FSGetCatalogInfo(&fsr, kFSCatInfoNone, NULL, NULL, fs, NULL) == noErr )
+ return 1;
+ return 0;
+#else
/* It's a pathname */
if( !PyArg_Parse(v, "O&", PyMac_GetStr255, &path) )
return 0;
refnum = 0; /* XXXX Should get CurWD here?? */
parid = 0;
+#endif
} else {
if( !PyArg_Parse(v, "(hlO&); FSSpec should be FSSpec, FSRef, fullpath or (vrefnum,dirid,path)",
&refnum, &parid, PyMac_GetStr255, &path)) {