[Pythonmac-SIG] Referencing drive path names on OS9

John W. Baxter jwblist at olympus.net
Thu Jul 8 04:49:30 CEST 2004


On 7/7/2004 2:03, "Jack Jansen" <Jack.Jansen at cwi.nl> wrote:

> 
> On 7 Jul 2004, at 05:56, Andrew Dufresne wrote:
> 
>>..
>>  
>> But what happens when you have two different disks that happen to have
>> the same name?
> 
> This is a general problem with using pathnames on MacOS9. According to
> the Apple specs you should be using FSRef's, FSSpec's or aliases to
> refer to files, not pathnames. For Python this means that a second disk
> with the same name is not visible to the Posix-compatible calls (open,
> os.chdir, many many more). If you use 100% Apple API calls (the
> FSspec/FSRef APIs mentioned above) there is no problem, though.
> 
> But in reality this appears to be a theoretical problem: I've never
> heard any Python user complain about this.
> 

I suspect most users intuitively "know" that having multiple volumes of the
same name is potentially troublesome (even though it worked out quite well
in Mac OS 9 and earlier from the software's point of view, scripting aside).

I also suspect that this happens in real life most often in situations like
mounting one machine in Firewire disk mode on another, both of them still
having volumes named "Macintosh HD".  And in those situations, Python is
unlikely to be used much, so Jack doesn't see many complaints.

  --John (who has been wrong many times before)


More information about the Pythonmac-SIG mailing list