[BUG] Problem with FileDirectory>assureExistence (etc)

Tim Rowledge tim at sumeru.stanford.edu
Fri Mar 29 00:44:36 UTC 2002


Ned Konz <ned at bike-nomad.com> is claimed by the authorities to have written:

> 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?
Or misspelt? For example, you enter a path on a Mac with a disc name that is
wrong (similar possible problem on Acorn). The problem here is that checking
for 'rootness' becomes tricky. At least on Acorn there is a naming protocol for
roots - filesystemname::discname.$ guarantees that you can check for a $: nad a
$$. Mac just sort of runs out of path.. whcih maybe a part of the answer. On
all three case I can check you do eventually get to a point where the dir name
is ''.

Properly detecting the root is one thing. Invalid roots need some kind of error
raised and handled. Maybe it is time to consider path canonicalisation again?
At least that would check for validity at some point.

tim
-- 
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Strange OpCodes: MW: Multiply Work




More information about the Squeak-dev mailing list