[Pythonmac-SIG] Serious bug with FSSpecs (and GUSI, and MacPython) on OSX

Alexandre Parenteau alexp@strata.com
Sun, 27 Jan 2002 22:26:47 -0800


Jack,

I think it is difficult to get a FSRef support in GUSI : plus I think we
need to get rid of GUSI ASAP.

Now I failed to understand the exact problem : isn't GUSI supposed to fail
to create a FSSpec with a name >= 32 ? May be it is not, I remember I had to
do something special in MacCvs.

alex.

----- Original Message -----
From: "Jack Jansen" <Jack.Jansen@oratrix.nl>
To: <pythonmac-sig@python.org>
Sent: Sunday, January 27, 2002 2:35 PM
Subject: [Pythonmac-SIG] Serious bug with FSSpecs (and GUSI, and MacPython)
on OSX


> Folks,
> I need some help. It turns out that the bug Russell Owen posted
> here before (505562 in sourceforge) that BuildApplet can destroy
> sourcefiles has even more far reaching consequences.
>
> The problem isn't with BuildApplet per se, the problem is with
> the way MacOSX creates FSSpecs for files with names that are too
> long (more than 32 chars) to represent in an FSSpec. What
> happens is that the first 22 chars are used, then #XXXXX is
> appended (where the XXXXX is a number unique to the file) and
> then the original extension is appended (don't know what
> happened if the original extension was more than 3 chars).
>
> But, and this is the bad news, this extension is *not* checked
> if you create an FSSpec by hand. So, if your original, existing,
> file has a ".py" extension you can create a valid FSSpec,
> pointing to the same file, without the ".py" extension. Or with
> a ".c" extension, or anything else.
>
> The other part of the bad news is that GUSI is completely
> FSSpec-based. Hence, when BuildApplet gets a ".py" file, creates
> the applet name by stripping the .py and then does
> try:
>      os.remove(outputfile)
> except ....
>
> The os.remove() succeeds and happily removes your sourcefile!
> --
> - Jack Jansen        <Jack.Jansen@oratrix.com>
> http://www.cwi.nl/~jack -
> - If I can't dance I don't want to be part of your revolution --
> Emma Goldman -
>
>
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
>