[BUG] Problem with FileDirectory>assureExistence (etc)

Bert Freudenberg bert at isg.cs.uni-magdeburg.de
Fri Mar 29 11:44:04 UTC 2002


On Thu, 28 Mar 2002, Ned Konz wrote:

> On Thursday 28 March 2002 02:13 pm, Bert Freudenberg wrote:
> 
> > 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.
> 
> So what happens with root-less file systems like Windows (and the old Mac?) 
> which have multiple volumes, each of which have their own root, and each of 
> which could be unmounted or otherwise unavailable?

Well, the original problem was an infinite recursion. If there are 
multiple root directories: fine. The problem is that currently, if a 
directory does not exist, the parent directory unconditionally is tested. 
That works fine only when there *is* a valid parent directory somewhere up 
the path. On first sight there always should be an existent parent 
directory, which led to the original implementation. 

Squeak always assumes a root directory. The FileList assumes this, for
example. On Win32, the children of the root directory (which is the empty
string) are the drives! See sqWin32Directory.c, function dir_Lookup().

Oh, btw, root directory listing is broken for the Unix SF VM? Or is it
just me? [... 10 minutes later ...] It's me *and* the VM *and* the image
code. If there's even one non-stat()-able file in the directory entries,
the primitive fails, and FileDir>>directoryContentsFor: throws an error.
The fix is ... now at SF ;-)

-- Bert




More information about the Squeak-dev mailing list