From: Jack Jansen Date: Wed, 20 Nov 1996 14:58:27 +0000 (+0000) Subject: Fixed FSSpec->pathname code to add colon if the fsspec points to a disk. X-Git-Tag: v1.5a1~924 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e1d8c9badea479837a7507118075f84c36fc957e;p=thirdparty%2FPython%2Fcpython.git Fixed FSSpec->pathname code to add colon if the fsspec points to a disk. --- diff --git a/Mac/Python/macgetargv.c b/Mac/Python/macgetargv.c index c1d1e3edef08..b395f9a60dac 100644 --- a/Mac/Python/macgetargv.c +++ b/Mac/Python/macgetargv.c @@ -139,6 +139,12 @@ PyMac_GetFullPath (FSSpec *fss, char *buf) plen = fss_current.name[0]; memcpy(buf, &fss_current.name[1], plen); buf[plen] = 0; + /* Special case for disk names */ + if ( fss_current.parID <= 1 ) { + buf[plen++] = ':'; + buf[plen] = 0; + return 0; + } while (fss_current.parID > 1) { /* Get parent folder name */ if (err = get_folder_parent(&fss_current, &fss_parent))