[BUG][FIX] FileStream naming problems

Tim Rowledge rowledge at interval.com
Thu Jun 3 00:56:51 UTC 1999


When translating a plugin or the vm, the code has recently been changed to
use a CrLfFileStream which resulted in my files going to all sorts of odd
places. It turns out that by refering directly to CrLfFileStream we miss
out the filename canonicalisation that was done when FileStream was used as
previously.

This is actually an endemic problem when one has a hierarchy where
subclasses that are originally intended to be accessed indirectly get used
directly. The 'root' class has code to keep everything tidy and then some
subclass is used in what seems a reasonable manner and the tidy-code is
missed out because of the method naming 'clash'.

To fix the problem in this case, I was able to rename the filestream
creation methods and redirect them a little more robustly. CrLfFileStream
(or indeed HTMLFileStream) can now be used without the name-fixing code
being missed. I'm sure there are better ways to do this in the long term,
but this should do for now.

tim

-- 
I'd kill for a Nobel Peace Prize.
Tim Rowledge:  rowledge at interval.com (w)  +1 (650) 842-6110 (w)
  tim at sumeru.stanford.edu (h)  <http://sumeru.stanford.edu/tim>

Content-Type: APPLICATION/Octet-stream; NAME="FilestreamFixes/2June321pm.cs"

Attachment converted: Anon:FilestreamFixes/2June321pm.cs (????/----) (0000A935)





More information about the Squeak-dev mailing list