[FIX] FileDirectory-checkName-localName-fix-jf

julian at beta4.com julian at beta4.com
Mon Feb 9 21:46:52 UTC 2004


Sorry, no tests for this one - the current factoring of filedirectory makes
 this hard as "filedirectory checkname: 'foo' fixErrors: true" could behave
 differently depending on what syystem you are running the tests on.  This
 would be much easier if the code worked more like
 "FileDirectory current checkName: 'foo' fixErrors: true" since you could then
 just test #checkName:fixErrors: on each subclass and test
 FileDirectory>>current once.

from preamble:

"Change Set:		FileDirectory-checkName-localName-fix-jf
Date:			7 February 2004
Author:			Julian Fitzell

FileDirectory class>>checkName:fixErrors: was passing on only the local
name portion of the fileName you give it.  This is problematic if you
were trying to get a valid file name from, for example, a string that
happens to have a forward slash in it on a Unix filesystem.  The
behaviour is also unusual since the method returns the fixed string if
the second parameter is true, and this means that if you passed in a
full path you would get only the last segment back.  Non of the in-image
senders of this method depended on the behaviour since they all pass in
only a local path anyway.

This changeset changes the behaviour to pass the complete string on for
checking.  It also changes the fullName method parameter name to
fileName and changes the comment appropriately."!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FileDirectory-checkName-localName-fix-jf.cs.gz
Type: application/octet-stream
Size: 877 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040209/fe5e657c/FileDirectory-checkName-localName-fix-jf.cs.obj


More information about the Squeak-dev mailing list