CrLfFileStream on MacOSX
Andrew P. Black
black at cs.pdx.edu
Sat Feb 17 08:24:06 UTC 2007
Hi Rick,
If I interpret what you are saying correctly, the meaning of the
primPathNameDelimiter method, which is given by
<primitive: 'primitiveDirectoryDelimitor' module: 'FilePlugin'>
has changed in more recent Mac VMs (I'm running 3.8.12Beta1U). It
was $:, but is now $/
This may well be a bug! I wonder if someone could explain why there
are platform-specific directory classes and what the "right" one
should be under OSX?
The logic for choosing the appropriate directory class used
primNameDelimiter, e.g.,
MacHFSPlusFileDirectory >> isActiveDirectoryClass
"Ok, lets see if we support HFS Plus file names, the long ones"
^ self pathNameDelimiter = self primPathNameDelimiter
and: [(SmalltalkImage current getSystemAttribute: 1201) notNil
and: [(SmalltalkImage current getSystemAttribute: 1201) asNumber
> 31]]
MacFileDirectory>>pathNameDelimiter
^ $:
So, by changing the meaning of the primitive
'primitiveDirectoryDelimitor', the directory class that one gets on
OSX has been changed too.
Again, what is the "correct" behavior? MacHFSPlusFileDirectory
doesn't seem to work on my Mac, even after changing the default
delimiter: maybe that is why the primitive was changed?
Andrew
P.S.
While poking around I found:
FileStream>>sourceFileSuffixes
^ {FileStream st. FileStream cs. FileStream multiSt. FileStream
multiCs} asSet asArray
Is there a reason for the asSet asArray? To make a copy? To
randomize the order? None of the senders seems to care ...
APB
On 16 Feb 2007, at 17:26, Rik Smoody wrote:
> I stumbled upon (probably) the same issue.
> Evidence, from an old image, but running it on newer VM:
>
> Performed by Squeak 3.8.15beta1U.app, on a Mac OS X 10.3.9:
> FileDirectory allSubclasses collect: [:class | class->class
> primPathNameDelimiter ]
> a Set(MacHFSPlusFileDirectory->$/ AcornFileDirectory->$/
> UnixFileDirectory->$/ MacFileDirectory->$/ DosFileDirectory->$/)
>
> The answer from Squeak 3.8.9beta8.app, on the same Mac
> a Set(MacHFSPlusFileDirectory->$: AcornFileDirectory->$:
> UnixFileDirectory->$: MacFileDirectory->$: DosFileDirectory->$:)
>
> The old-version answer is somewhat more compatible with the Mac.
>
> For example, when running one old utility image, I got this message:
> /Tomato:Users:Rik:Pictures does not exist
> the problem apparently caused by that leading $/
> as changing that manually back to a $: reveals the expected
> existence of the file.
Andrew P. Black
Department of Computer Science
Portland State University
+1 503 725 2411
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070217/dddea14d/attachment.htm
More information about the Squeak-dev
mailing list
|