mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Fixed FSSpec->pathname code to add colon if the fsspec points to a disk.
This commit is contained in:
parent
56c3c7632e
commit
e1d8c9bade
1 changed files with 6 additions and 0 deletions
|
|
@ -139,6 +139,12 @@ PyMac_GetFullPath (FSSpec *fss, char *buf)
|
||||||
plen = fss_current.name[0];
|
plen = fss_current.name[0];
|
||||||
memcpy(buf, &fss_current.name[1], plen);
|
memcpy(buf, &fss_current.name[1], plen);
|
||||||
buf[plen] = 0;
|
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) {
|
while (fss_current.parID > 1) {
|
||||||
/* Get parent folder name */
|
/* Get parent folder name */
|
||||||
if (err = get_folder_parent(&fss_current, &fss_parent))
|
if (err = get_folder_parent(&fss_current, &fss_parent))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue