summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1996-11-20 14:58:27 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1996-11-20 14:58:27 (GMT)
commite1d8c9badea479837a7507118075f84c36fc957e (patch)
treec1ce841bdeb48095cd32568eac4c9678ee25c257
parent56c3c7632ee90673623b6cf16bbac1e3db41b106 (diff)
downloadcpython-e1d8c9badea479837a7507118075f84c36fc957e.zip
cpython-e1d8c9badea479837a7507118075f84c36fc957e.tar.gz
cpython-e1d8c9badea479837a7507118075f84c36fc957e.tar.bz2
Fixed FSSpec->pathname code to add colon if the fsspec points to a disk.
-rw-r--r--Mac/Python/macgetargv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Mac/Python/macgetargv.c b/Mac/Python/macgetargv.c
index c1d1e3e..b395f9a 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))