[Bug?!] FileDirectory>>fullNameFor: (was RE: [ENH] UnixFileDirectory tweak)

Bert Freudenberg bert at isgnw.CS.Uni-Magdeburg.De
Fri Dec 17 16:56:40 UTC 1999


On Fri, 17 Dec 1999, Raab, Andreas wrote:

> FileDirectory default fullNameFor: 'hello\hello'
> 	=>  'hello\hello'
> 
> Oops?!?! The latest is not what one would expect from #fullNameFor: but it
> seems that's what's making the stuff below work. Now is that a bug or what?!

I'd say it is "convenient", but nevertheless a bug in the current form.

> Could somebody try something alike on other platforms (e.g., Unix, Mac) that
> support relative path names?!

It does exactly the same on Unix.

> Any comments on what the behavior of #fullNameFor: *should* be?!
> (preferredly from people who have already run into this situation ;-)

IMHO, it should detect if the given path is relative or absolute, and if
it's relative, concatenate it with the default path, otherwise just answer
it. Provided that the default path is always absolute, answer a full path
starting from the root ('/') on Unix, the volume on Mac, the drive ('C:\')
or remote machine ('\\host\') on Windows.

> It seems to me that the 'bug' is pretty much what you want since
> without a full qualification of the name you just start from a default
> directory (note to Bert: the default directory could be set to the
> image directory from the VM; so you would get exactly what you expect,
> and that's why this stuff actually works on windows ;-)

It's the same on unix, but a primitive could change the cwd (even by
accident) and thus break the squeak code. So I'd prefer not to use cwd at
all.

  -Bert-





More information about the Squeak-dev mailing list