diff Mac/Python/macgetargv.c @ 4552:efb2938ce676 legacy-trunk

Fixed FSSpec->pathname code to add colon if the fsspec points to a disk.
author Jack Jansen <jack.jansen@cwi.nl>
date Wed, 20 Nov 1996 14:58:27 +0000
parents 4d0681f7cf6b
children d6b292a33cfe
line wrap: on
line diff
--- a/Mac/Python/macgetargv.c	Wed Nov 20 14:57:27 1996 +0000
+++ b/Mac/Python/macgetargv.c	Wed Nov 20 14:58:27 1996 +0000
@@ -139,6 +139,12 @@
 	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))