[BUG] save as...

tim Rowledge tim at sumeru.stanford.edu
Sun Mar 7 00:32:21 UTC 2004


Yoshiki Ohshima wrote:

>   Now, if I choose the 'save as...' menu, and type something like
> 'test' in the dialog, the image gets saved as
> 'C:\squeak\Squeak3.image' as opposed to
> 'C:\squeak\Squeak3.7a\test.image', which is the expected behavior.
> 
Ah, poo. This is yet another side effect of the crapulence found within 
the file naming code. In the #fullNameForChangesNamed: method we see 
#baseNameFor: which strinps off everything after the last 
extensionDelimiter. In the case of a directory with a suitable character 
($. for most machines) and a user entered name with NO such character 
the directory name is the one that get mangled. Result - an image saved 
in the wrong place. If file names weren't simply abused strings it might 
be a bit less likely for this to happen.

I think that since the method is simply trying to make sure there is no 
partial or mangled '.image' type string at the end of the entered name 
we can probably rescue this. I'll see what I can think of.

Of course, we could simply assert that anyone foolish enough to use dots 
in their directory names is SOL. :-)

tim




More information about the Squeak-dev mailing list