]> granicus.if.org Git - python/commitdiff
Fixed FSSpec->pathname code to add colon if the fsspec points to a disk.
authorJack Jansen <jack.jansen@cwi.nl>
Wed, 20 Nov 1996 14:58:27 +0000 (14:58 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Wed, 20 Nov 1996 14:58:27 +0000 (14:58 +0000)
Mac/Python/macgetargv.c

index c1d1e3edef08a1448934705c277611aa1524b7cf..b395f9a60dac7190cb23ae17c626b115940a4c56 100644 (file)
@@ -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))