[BUG] Problem with FileDirectory>assureExistence (etc)

Bert Freudenberg bert at isg.cs.uni-magdeburg.de
Thu Mar 28 22:13:05 UTC 2002


On Wed, 27 Mar 2002, Tim Rowledge wrote:

> In 3.2#4743 (the latest so far as I can tell) there is an infinite
> recursion in FileDirectory>assureExistence.
> 
> I've been able to recreate this on Acorn, Mac & unix - can't try
> windows.
> 
> To see the problem try the logical equivalent of:-
> 
> FileDirectory on: '/wibbly/foo'  {unix - make sure you don't actually have /wibbly!}
> FileDirectory on: '<name of disk you dont have>:fooble' {Mac}
> FileDirectory on: 'adfsbang::$/fooble/wiz' {Acorn - yeah right, like you have one}
> 
> The problem is that we get to the root of the faulty path and then keep
> repeating it; either with '' or '/' depending on the OS. I guess there
> needs to be some extra check for the top of the possible tree (unix)
> and/or faulty root names (Acorn, Mac).
> 
> I'm not sure what a really clean answer is right now and I'm a bit busy
> right now so I'll leave it as an entertaining exercise for some reader
> :-)

The right fix seems to be to explicitely test if the file directory is, in
fact, the root directory, and just declare it to be existent.

Incidentally, the same infinite recursion occurs when the sandbox mode is 
activated and you go outside. I posted a fix (which did not yet get 
picked up) here

	http://swiki.gsug.org:8080/sqfixes/2223.html

I guess my fix should be moved from UnixFileDir up to FileDir because this 
can happen on every platform.

So please, if anybody's fixing this (I don't have time right now), fix 
both issues at once :-)

-- Bert




More information about the Squeak-dev mailing list