[PYTHONMAC-SIG] chdir(), listdir() on other volumes [was Mac Open]

Jack Jansen Jack.Jansen@cwi.nl
Tue, 09 Jul 1996 16:03:20 +0200


Recently, "Steven D. Majewski" <sdm7g@virginia.edu> said:
> 
> 
> While we're on the subject, Yet Another Mac pathname gotcha :
> 
>  I was going crazy trying to chdir() onto another volume, with
> no luck. I was about to finally decide that it *wasn't* a pathname
> syntax problem, but a bug in the Python code, when I noted that
> getbootvol() returns the name with a *TRAILING* ":" -- which is
> not how the volumes are displayed when you chdir all the way to
> the root and do a listdir().

This is interesting, I never knew of the "virtual" toplevel above all
disks! Still, it is reasonable that listdir() returns the names
without trailing colon even here: otherwise any pathname manipulating
routines would become even more complicated than they already are...

Now that we're on the subject of pathnames, there's something else
that bothers me: if I read the docs correctly MacOS doesn't mind in
the least if you have two disks with the same name (apparently it
can't get confused, because it uses FSSpecs everywhere
internally). Anyone feel like trying out how Python reacts to having
two disks with the same name mounted?
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@cwi.nl      | ++++ if you agree copy these lines to your sig ++++
http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm 

=================
PYTHONMAC-SIG  - SIG on Python for the Apple Macintosh

send messages to: pythonmac-sig@python.org
administrivia to: pythonmac-sig-request@python.org
=================