diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1996-11-20 14:58:27 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1996-11-20 14:58:27 (GMT) |
commit | e1d8c9badea479837a7507118075f84c36fc957e (patch) | |
tree | c1ce841bdeb48095cd32568eac4c9678ee25c257 /Mac/Python | |
parent | 56c3c7632ee90673623b6cf16bbac1e3db41b106 (diff) | |
download | cpython-e1d8c9badea479837a7507118075f84c36fc957e.zip cpython-e1d8c9badea479837a7507118075f84c36fc957e.tar.gz cpython-e1d8c9badea479837a7507118075f84c36fc957e.tar.bz2 |
Fixed FSSpec->pathname code to add colon if the fsspec points to a disk.
Diffstat (limited to 'Mac/Python')
-rw-r--r-- | Mac/Python/macgetargv.c | 6 |
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)) |